diff options
author | Mark Wielaard <mark@klomp.org> | 2019-07-03 22:22:16 +0200 |
---|---|---|
committer | Mark Wielaard <mark@klomp.org> | 2019-07-05 09:40:26 +0200 |
commit | 5a4a6f44f0748840a7abe341098445c42d8d979a (patch) | |
tree | d828c2f1226c6dde6aa6d9f39a33664996cb4847 | |
parent | 53f3d0d71c3c445bc4ac413d42c4386381e47b49 (diff) | |
download | bzip2-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-x | prepare-release.sh | 14 |
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 | |||
20 | LANG=C | 20 | LANG=C |
21 | VERSION="$1" | 21 | VERSION="$1" |
22 | DATE=$(date +"%d %B %Y") | 22 | DATE=$(date +"%d %B %Y") |
23 | DAY=$(date +"%d") | ||
24 | MONTH=$(date +"%B") | ||
25 | SHORTMONTH=$(date +"%b") | ||
26 | YEAR=$(date +"%Y") | ||
23 | 27 | ||
24 | # Replace the version strings in the comments | 28 | # Replace the version strings and date ranges in the comments |
25 | VER_PREFIX="bzip2/libbzip2 version " | 29 | VER_PREFIX="bzip2/libbzip2 version " |
26 | sed -i -e "s@${VER_PREFIX}[0-9].*@${VER_PREFIX}${VERSION} of ${DATE}@" \ | 30 | sed -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 |
30 | DAY=$(date +"%d") | ||
31 | MONTH=$(date +"%B") | ||
32 | SHORTMONTH=$(date +"%b") | ||
33 | YEAR=$(date +"%Y") | ||
34 | printf "%2s %8s %s\n" "$DAY" "$MONTH" "$YEAR (bzip2, version $VERSION)" \ | 35 | printf "%2s %8s %s\n" "$DAY" "$MONTH" "$YEAR (bzip2, version $VERSION)" \ |
35 | >> README | 36 | >> README |
36 | 37 | ||
37 | # Update manual | 38 | # Update manual |
38 | sed -i -e "s@ENTITY bz-version \".*\"@ENTITY bz-version \"$VERSION\"@" \ | 39 | sed -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 |