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
bzip2-5a4a6f44f0748840a7abe341098445c42d8d979a.tar.bz2
bzip2-5a4a6f44f0748840a7abe341098445c42d8d979a.zip
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
20LANG=C 20LANG=C
21VERSION="$1" 21VERSION="$1"
22DATE=$(date +"%d %B %Y") 22DATE=$(date +"%d %B %Y")
23DAY=$(date +"%d")
24MONTH=$(date +"%B")
25SHORTMONTH=$(date +"%b")
26YEAR=$(date +"%Y")
23 27
24# Replace the version strings in the comments 28# Replace the version strings and date ranges in the comments
25VER_PREFIX="bzip2/libbzip2 version " 29VER_PREFIX="bzip2/libbzip2 version "
26sed -i -e "s@${VER_PREFIX}[0-9].*@${VER_PREFIX}${VERSION} of ${DATE}@" \ 30sed -i -e "s@${VER_PREFIX}[0-9].*@${VER_PREFIX}${VERSION} of ${DATE}@" \
27 CHANGES LICENSE README* *.c *.h *.pl *.sh 31 -e "s@ (C) \([0-9]\+\)-[0-9]\+ @ (C) \1-$YEAR @" \
32 CHANGES LICENSE Makefile* README* *.c *.h *.pl *.sh
28 33
29# Add an entry to the README 34# Add an entry to the README
30DAY=$(date +"%d")
31MONTH=$(date +"%B")
32SHORTMONTH=$(date +"%b")
33YEAR=$(date +"%Y")
34printf "%2s %8s %s\n" "$DAY" "$MONTH" "$YEAR (bzip2, version $VERSION)" \ 35printf "%2s %8s %s\n" "$DAY" "$MONTH" "$YEAR (bzip2, version $VERSION)" \
35 >> README 36 >> README
36 37
37# Update manual 38# Update manual
38sed -i -e "s@ENTITY bz-version \".*\"@ENTITY bz-version \"$VERSION\"@" \ 39sed -i -e "s@ENTITY bz-version \".*\"@ENTITY bz-version \"$VERSION\"@" \
39 -e "s@ENTITY bz-date \".*\"@ENTITY bz-date \"$DAY $MONTH $YEAR\"@" \ 40 -e "s@ENTITY bz-date \".*\"@ENTITY bz-date \"$DAY $MONTH $YEAR\"@" \
41 -e "s@ENTITY bz-lifespan \"\([0-9]\+\)-[0-9]\+\"@ENTITY bz-filespan \"\1-$YEAR\"@"\
40 entities.xml 42 entities.xml
41 43
42# bzip2.1 should really be generated from the manual.xml, but currently 44# bzip2.1 should really be generated from the manual.xml, but currently