Skip to content

Commit 03763f4

Browse files
committed
Tweaked mkrelease to handle 3-stepped revision numbers like 5.0.0
- Legacy-Id: 7183
1 parent e67a78b commit 03763f4

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

bin/mkrelease

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -153,13 +153,13 @@ note " $DIR"
153153
REPO=${REPO%/} # remove trailing slash
154154
SRC=${SRC#/} # remove leading slash
155155

156-
MAJOR=${VER%.*}
157-
MINOR=${VER#*.}
158-
MINOR=${MINOR##0}
159-
VER="$(printf %d.%02d $MAJOR $MINOR)"
160-
NEXT=$(( $MINOR + 1 ))
161-
DEV="$(printf %d.%02d-dev $MAJOR $NEXT)"
162-
156+
MAJOR=${VER%%.*}
157+
REST=${VER#*.}
158+
MINOR=${REST%%.*}
159+
CHANGE=${REST#*.}
160+
VER="$(printf %d.%d.%d $MAJOR $MINOR $CHANGE)"
161+
NEXT=$(( $CHANGE + 1 ))
162+
DEV="$(printf %d.%d.%d-dev $MAJOR $MINOR $NEXT)"
163163

164164
note "Checking that changelog information is available"
165165
changes=$( sed -n "/^ietfdb ($VER.*)/,/^ -- /p" changelog )

0 commit comments

Comments
 (0)