Show More
@@ -46,6 +46,13 b' if [ ! -d .hg ]; then' | |||||
46 | fi |
|
46 | fi | |
47 |
|
47 | |||
48 | gethgversion |
|
48 | gethgversion | |
|
49 | debver="$version" | |||
|
50 | if [ -n "$type" ] ; then | |||
|
51 | debver="$debver~$type" | |||
|
52 | fi | |||
|
53 | if [ -n "$distance" ] ; then | |||
|
54 | debver="$debver+$distance-$node" | |||
|
55 | fi | |||
49 |
|
56 | |||
50 | control=debian/control |
|
57 | control=debian/control | |
51 | changelog=debian/changelog |
|
58 | changelog=debian/changelog | |
@@ -61,7 +68,7 b' if [ "$BUILD" ]; then' | |||||
61 |
|
68 | |||
62 | # This looks like sed -i, but sed -i behaves just differently enough |
|
69 | # This looks like sed -i, but sed -i behaves just differently enough | |
63 | # between BSD and GNU sed that I gave up and did the dumb thing. |
|
70 | # between BSD and GNU sed that I gave up and did the dumb thing. | |
64 |
sed "s/__VERSION__/$ver |
|
71 | sed "s/__VERSION__/$debver/" < $changelog > $changelog.tmp | |
65 | date=$(date --rfc-2822) |
|
72 | date=$(date --rfc-2822) | |
66 | sed "s/__DATE__/$date/" < $changelog.tmp > $changelog |
|
73 | sed "s/__DATE__/$date/" < $changelog.tmp > $changelog | |
67 | rm $changelog.tmp |
|
74 | rm $changelog.tmp | |
@@ -79,6 +86,6 b' if [ "$CLEANUP" ] ; then' | |||||
79 | find ../mercurial*.deb ../mercurial_*.build ../mercurial_*.changes \ |
|
86 | find ../mercurial*.deb ../mercurial_*.build ../mercurial_*.changes \ | |
80 | -type f -newer $control -print0 | \ |
|
87 | -type f -newer $control -print0 | \ | |
81 | xargs -Inarf -0 mv narf "$OUTPUTDIR" |
|
88 | xargs -Inarf -0 mv narf "$OUTPUTDIR" | |
82 |
echo "Built packages for $ver |
|
89 | echo "Built packages for $debver:" | |
83 | find "$OUTPUTDIR" -type f -newer $control -name '*.deb' |
|
90 | find "$OUTPUTDIR" -type f -newer $control -name '*.deb' | |
84 | fi |
|
91 | fi |
@@ -49,6 +49,18 b' fi' | |||||
49 |
|
49 | |||
50 | gethgversion |
|
50 | gethgversion | |
51 |
|
51 | |||
|
52 | # TODO: handle distance/node set, and type set | |||
|
53 | ||||
|
54 | if [ -z "$type" ] ; then | |||
|
55 | release=1 | |||
|
56 | else | |||
|
57 | release=0.9_$type | |||
|
58 | fi | |||
|
59 | ||||
|
60 | if [ -n "$distance" ] ; then | |||
|
61 | release=$release+$distance_$node | |||
|
62 | fi | |||
|
63 | ||||
52 | if [ "$PYTHONVER" ]; then |
|
64 | if [ "$PYTHONVER" ]; then | |
53 | release=$release+$PYTHONVER |
|
65 | release=$release+$PYTHONVER | |
54 | RPMPYTHONVER=$PYTHONVER |
|
66 | RPMPYTHONVER=$PYTHONVER |
@@ -1,3 +1,12 b'' | |||||
|
1 | # Extract version number into 4 parts, some of which may be empty: | |||
|
2 | # | |||
|
3 | # version: the numeric part of the most recent tag. Will always look like 1.3. | |||
|
4 | # | |||
|
5 | # type: if an rc build, "rc", otherwise empty | |||
|
6 | # | |||
|
7 | # distance: the distance from the nearest tag, or empty if built from a tag | |||
|
8 | # | |||
|
9 | # node: the node|short hg was built from, or empty if built from a tag | |||
1 | gethgversion() { |
|
10 | gethgversion() { | |
2 | make clean |
|
11 | make clean | |
3 | make local || make local PURE=--pure |
|
12 | make local || make local PURE=--pure | |
@@ -7,13 +16,20 b' gethgversion() {' | |||||
7 |
|
16 | |||
8 | hgversion=`$HG version | sed -ne 's/.*(version \(.*\))$/\1/p'` |
|
17 | hgversion=`$HG version | sed -ne 's/.*(version \(.*\))$/\1/p'` | |
9 |
|
18 | |||
|
19 | if echo $hgversion | grep + > /dev/null 2>&1 ; then | |||
|
20 | tmp=`echo $hgversion | cut -d+ -f 2` | |||
|
21 | hgversion=`echo $hgversion | cut -d+ -f 1` | |||
|
22 | distance=`echo $tmp | cut -d- -f 1` | |||
|
23 | node=`echo $tmp | cut -d- -f 2` | |||
|
24 | else | |||
|
25 | distance='' | |||
|
26 | node='' | |||
|
27 | fi | |||
10 | if echo $hgversion | grep -- '-' > /dev/null 2>&1; then |
|
28 | if echo $hgversion | grep -- '-' > /dev/null 2>&1; then | |
11 | # nightly build case, version is like 1.3.1+250-20b91f91f9ca |
|
|||
12 |
|
|
29 | version=`echo $hgversion | cut -d- -f1` | |
13 |
|
|
30 | type=`echo $hgversion | cut -d- -f2` | |
14 | else |
|
31 | else | |
15 | # official tag, version is like 1.3.1 |
|
32 | version=$hgversion | |
16 | version=`echo $hgversion | sed -e 's/+.*//'` |
|
33 | type='' | |
17 | release='0' |
|
|||
18 | fi |
|
34 | fi | |
19 | } |
|
35 | } |
General Comments 0
You need to be logged in to leave comments.
Login now