-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathchangelog
More file actions
executable file
·44 lines (38 loc) · 1.08 KB
/
Copy pathchangelog
File metadata and controls
executable file
·44 lines (38 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
if [ $# -lt 4 -o $# -gt 5 ]; then
echo "Usage: $0 major minor build suite [new]"
echo " eg: $0 3 4 1 testing -> set Opencast's version to 3.4-1 in testing"
echo " eg: $0 4 0 1 testing new -> erase the current changelog for opencast and set the version to 4.0-1 in testing"
exit 1
fi
major=$1
minor=$2
build=$3
suite=$4
export DEBEMAIL="Greg Logan <gregorydlogan@gmail.com>"
cd opencast
#If the new flag is set, erase the current changelog
if [ $# -eq 5 ]; then
rm -f debian/changelog
new="--create"
else
new="-b"
fi
message="Initial release based on Opencast $major.$minor"
if [ "$build" != "1" ]; then
message="Build $build based on Opencast $major.$minor"
fi
#Create the changelog entry
dch \
$new \
--package opencast-$major \
--newversion $major.$minor-$build \
--allow-lower-version \
--force-bad-version \
-D $suite \
-u low \
"$message"
#Zero out the time
sed -i 's/..\:..\:../00:00:00/' debian/changelog
sed -i "s/\(opencast.*\) $major.[x0-9]\{1,2\}-[x0-9]\{1,2\}/\1 $major.$minor-$build/g" debian/control
sed -i "s/$major.x)/$major.x-$build)/g" debian/control