Skip to content

Commit e4a1340

Browse files
committed
Tweaked the mkrelease script a bit to use standard python development release numbers.
- Legacy-Id: 9170
1 parent cb70eb6 commit e4a1340

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

bin/mkrelease

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ longopts=help,dry-run,verbose,version
7979

8080
# Default values
8181
MSG=""
82+
PROJ=ietfdb
8283
VERFILE=ietf/__init__.py
8384
SETTINGS=ietf/settings.py
8485
do=""
@@ -158,18 +159,18 @@ SRC=${SRC#/} # remove leading slash
158159
MAJOR=${VER%%.*}
159160
REST=${VER#*.}
160161
MINOR=${REST%%.*}
161-
CHANGE=${REST#*.}
162-
VER="$(printf %d.%d.%d $MAJOR $MINOR $CHANGE)"
163-
NEXT=$(( $CHANGE + 1 ))
164-
DEV="$(printf %d.%d.%d-dev0 $MAJOR $MINOR $NEXT)"
162+
MAINT=${REST#*.}
163+
VER="$(printf %d.%d.%d $MAJOR $MINOR $MAINT)"
164+
NEXT=$(( $MAINT + 1 ))
165+
DEV="$(printf %d.%d.%d.dev0 $MAJOR $MINOR $NEXT)"
165166

166167
note "Checking that there's a recent test-crawler log"
167168
touch -d $RDATE .svn/.latest-commit
168169
TCLOG=$(ls -t ../test-crawl-*.log | head -n 1)
169170
[ $TCLOG -nt .svn/.latest-commit ] || die "Looked for ../test-crawl-*.log, but didn't find one newer than the latest repository commit ($RDATE)"
170171

171172
note "Checking that changelog information is available"
172-
changes=$( sed -n "/^ietfdb ($VER.*)/,/^ -- /p" changelog )
173+
changes=$( sed -n "/^$PROJ ($VER.*)/,/^ -- /p" changelog )
173174
[ "$changes" ] || die "No changelog information for $VER found"
174175
note "$changes"
175176

@@ -190,7 +191,7 @@ note "Verifying there's no uncommitted changes..."
190191
$do svn st | grep "^[AMGRD] " && die "There seems to be uncommitted changes in this working copy"
191192

192193
note "\nUpdating the version info in $VERFILE and making sure'\$Rev\$' is Ok"
193-
$do sed -i -r -e "/^__version__/s/\"[.0-9]+(-dev[0-9]*)?\"/\"$VER\"/" \
194+
$do sed -i -r -e "/^__version__/s/\"[.0-9]+(dev[0-9]+)?\"/\"$VER\"/" \
194195
-e "/^__rev__/s/\".*\"/\"\$Rev:\$\"/" \
195196
$VERFILE
196197

@@ -234,10 +235,10 @@ Release notes:
234235
$changes
235236
236237
The new version is available for installation through SVN checkout, with
237-
'svn checkout http://svn.tools.ietf.org/svn/tools/ietfdb/tags/$VER'
238+
'svn checkout http://svn.tools.ietf.org/svn/tools/$PROJ/tags/$VER'
238239
239240
For development, check out the new development version instead:
240-
'svn checkout http://svn.tools.ietf.org/svn/tools/ietfdb/tags/dev/$DEV'
241+
'svn checkout http://svn.tools.ietf.org/svn/tools/$PROJ/tags/dev/$DEV'
241242
242243
Regards,
243244

0 commit comments

Comments
 (0)