@@ -16,7 +16,7 @@ SYNOPSIS
1616
1717DESCRIPTION
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
3535EOF
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..."
141141while [ " ${# 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%/* }
147147done
148148if [ " $DIR " != " $SRC " ]; then
149149 die " Couldn't find the root of your '$SRC ' working copy"
150150fi
151+ note " $DIR "
151152
152153REPO=${REPO%/ } # remove trailing slash
153154SRC=${SRC#/ } # remove leading slash
@@ -160,17 +161,25 @@ NEXT=$(( $MINOR + 1 ))
160161DEV=" $( 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+
163173note " Verifying that version $VER doesn't already exist..."
164174svn 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)."
165175note " Ok"
166176
177+ note " Committing the changelog..."
178+ $do svn commit changelog -m " Changelog entry for $VER "
179+
167180note " 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-
174183note " \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