Skip to content

Commit 0e35dc4

Browse files
committed
Tweaks to the test/mkrelease script.
- Legacy-Id: 1660
1 parent 6c21453 commit 0e35dc4

1 file changed

Lines changed: 16 additions & 7 deletions

File tree

test/mkrelease

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ SYNOPSIS
1616
1717
DESCRIPTION
1818
19-
Do the sequence of actions necesary to properly produce a release
19+
Do the sequence of actions necessary to properly produce a release
2020
branch. This includes updating the project version and committing that
2121
to the repository, creating a release tag and a release branch if
2222
needed, and updating the project version again to indicate that any
@@ -35,7 +35,7 @@ DESCRIPTION
3535
EOF
3636
echo -e "OPTIONS"
3737
if [ "$(uname)" = "Linux" ]; then
38-
egrep "^[ ]+[-][A-Za-z| -]+\*?\)[ ]+[A-Za-z].+#" $0 | tr -s "\t|" "\t," | sed -r -e 's/\)[ \t]+([A-Z]+)=\$2[^#]*#/=\1\t/' -e 's/\)[^#]*#/\t/'
38+
egrep "^[ ]+[-][A-Za-z| -]+\*?\)[ ]+[A-Za-z].+#" $0 | tr -s "\t|" "\t," | sed -r -e 's/\)[ \t]+([A-Z]+)=\$2[^#]*#/=\\1\t/' -e 's/\)[^#]*#/\t/'
3939
else
4040
egrep "^[ ]+[-][A-Za-z| -]+\*?\)[ ]+[A-Za-z].+#" $0 | sed 's/\|.*\$2[^#]*#/ /'| sed -E 's/\|.*\)[^#]*#/ /'
4141
fi
@@ -141,13 +141,14 @@ note "Locating the root of the working copy..."
141141
while [ "${#DIR}" -gt "${#SRC}" ]; do
142142
[ "$DIR" = "$prev" ] && die "Internal error"
143143
cd ..
144-
note " now at $PWD"
144+
#note " now at $PWD"
145145
prev=$DIR
146146
DIR=${DIR%/*}
147147
done
148148
if [ "$DIR" != "$SRC" ]; then
149149
die "Couldn't find the root of your '$SRC' working copy"
150150
fi
151+
note " $DIR"
151152

152153
REPO=${REPO%/} # remove trailing slash
153154
SRC=${SRC#/} # remove leading slash
@@ -160,17 +161,25 @@ NEXT=$(( $MINOR + 1 ))
160161
DEV="$(printf %d.%02d-dev $MAJOR $NEXT)"
161162

162163

164+
note "Checking that changelog information is available"
165+
changes=$( sed -n "/^ietfdb ($VER.*)/,/^ -- /p" changelog | awk '{ if (line) print line ; line=$0 }' )
166+
[ "$changes" ] || die "No changelog information for $VER found"
167+
note "$changes"
168+
169+
note "Set the current time on the release notes in the changelog file"
170+
sed -r -i -e "1,/^ -- /s/([A-Za-z-]+ <[a-z0-9.-]+@[a-z0-9.-]+> ).*$/\1$(date +'%d %b %Y %H:%M:%S %z')/" changelog
171+
note " $(grep -m1 "^ -- " changelog)"
172+
163173
note "Verifying that version $VER doesn't already exist..."
164174
svn info $REPO/tags/$VER 2>&1 | grep -q "Not a valid URL" || die "The tag '$VER' already exists (or there was an error testing for it)."
165175
note " Ok"
166176

177+
note "Committing the changelog..."
178+
$do svn commit changelog -m "Changelog entry for $VER"
179+
167180
note "Verifying there's no uncommitted changes..."
168181
$do svn st | grep "^[AMGRD] " && die "There seems to be uncommitted changes in this working copy"
169182

170-
note "Checking that changelog information is available"
171-
changes=$( sed -n "/^ietfdb ($VER.*)/,/^ -- /p" changelog | awk '{ if (line) print line ; line=$$0 }' )
172-
[ "$changes" ] || die "No changelog information for $VER found"
173-
174183
note "\nUpdating the version info in $VERFILE and making sure'\$Rev\$' is Ok"
175184
$do sed -i -r -e "/^__version__/s/\"[.0-9]+(-dev)?\"/\"$VER\"/" \
176185
-e "/^__rev__/s/\".*\"/\"\$Rev:\$\"/" \

0 commit comments

Comments
 (0)