aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Wielaard <mark@klomp.org>2019-07-03 22:22:16 +0200
committerMark Wielaard <mark@klomp.org>2019-07-05 09:40:26 +0200
commit5a4a6f44f0748840a7abe341098445c42d8d979a (patch)
treed828c2f1226c6dde6aa6d9f39a33664996cb4847
parent53f3d0d71c3c445bc4ac413d42c4386381e47b49 (diff)
downloadbzip2-5a4a6f44f0748840a7abe341098445c42d8d979a.tar.gz
Update prepare-release.sh for Makefile* and date ranges.
Also update the version number in the Makefile comments. And update any date ranges to include the current year.
-rwxr-xr-xprepare-release.sh14
1 files changed, 8 insertions, 6 deletions
diff --git a/prepare-release.sh b/prepare-release.sh
index db736b7..a1ae375 100755
--- a/prepare-release.sh
+++ b/prepare-release.sh
@@ -20,23 +20,25 @@ fi
LANG=C
VERSION="$1"
DATE=$(date +"%d %B %Y")
+DAY=$(date +"%d")
+MONTH=$(date +"%B")
+SHORTMONTH=$(date +"%b")
+YEAR=$(date +"%Y")
-# Replace the version strings in the comments
+# Replace the version strings and date ranges in the comments
VER_PREFIX="bzip2/libbzip2 version "
sed -i -e "s@${VER_PREFIX}[0-9].*@${VER_PREFIX}${VERSION} of ${DATE}@" \
- CHANGES LICENSE README* *.c *.h *.pl *.sh
+ -e "s@ (C) \([0-9]\+\)-[0-9]\+ @ (C) \1-$YEAR @" \
+ CHANGES LICENSE Makefile* README* *.c *.h *.pl *.sh
# Add an entry to the README
-DAY=$(date +"%d")
-MONTH=$(date +"%B")
-SHORTMONTH=$(date +"%b")
-YEAR=$(date +"%Y")
printf "%2s %8s %s\n" "$DAY" "$MONTH" "$YEAR (bzip2, version $VERSION)" \
>> README
# Update manual
sed -i -e "s@ENTITY bz-version \".*\"@ENTITY bz-version \"$VERSION\"@" \
-e "s@ENTITY bz-date \".*\"@ENTITY bz-date \"$DAY $MONTH $YEAR\"@" \
+ -e "s@ENTITY bz-lifespan \"\([0-9]\+\)-[0-9]\+\"@ENTITY bz-filespan \"\1-$YEAR\"@"\
entities.xml
# bzip2.1 should really be generated from the manual.xml, but currently