aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Wielaard <mark@klomp.org>2019-06-25 19:22:37 +0200
committerMark Wielaard <mark@klomp.org>2019-06-25 19:30:27 +0200
commitf1e937776c5f331e24cc63a9d8e7ae9445a76761 (patch)
treed67b152eb7a70bc63146a1f0edba0e8126314669
parentff986850159a1ea0c75617ffa792d1bb2069856e (diff)
downloadbzip2-f1e937776c5f331e24cc63a9d8e7ae9445a76761.tar.gz
bzip2-f1e937776c5f331e24cc63a9d8e7ae9445a76761.tar.bz2
bzip2-f1e937776c5f331e24cc63a9d8e7ae9445a76761.zip
Add prepare-release.sh script.
Script to run to prepare a new release. It will update the release number and tell you to update the CHANGES file and to double check everything looks before doing the release commit and tagging. Afterwards you probably want to run release-update.sh to upload the release and update the website at https://sourceware.org/bzip2/ There are embedded version strings and dates in a couple of places. To keep the script simple remove some that aren't absolutely necessary. README now just points to CHANGES. README.COMPILATION.PROBLEMS only mentions the version once at the top. bzip2.c only mentions the version once when doing --version. manual.xml now doesn't have any embedded versions, just uses &bz-version; everywhere.
-rw-r--r--README23
-rw-r--r--README.COMPILATION.PROBLEMS2
-rw-r--r--bzip2.c2
-rw-r--r--manual.xml4
-rwxr-xr-xprepare-release.sh80
-rwxr-xr-xrelease-update.sh1
6 files changed, 86 insertions, 26 deletions
diff --git a/README b/README
index c3bcbeb..bf95ad7 100644
--- a/README
+++ b/README
@@ -161,31 +161,10 @@ WHAT'S NEW IN 0.9.5 ?
161 * Many small improvements in file and flag handling. 161 * Many small improvements in file and flag handling.
162 * A Y2K statement. 162 * A Y2K statement.
163 163
164WHAT'S NEW IN 1.0.0 ? 164WHAT'S NEW IN 1.0.x ?
165 165
166 See the CHANGES file. 166 See the CHANGES file.
167 167
168WHAT'S NEW IN 1.0.2 ?
169
170 See the CHANGES file.
171
172WHAT'S NEW IN 1.0.3 ?
173
174 See the CHANGES file.
175
176WHAT'S NEW IN 1.0.4 ?
177
178 See the CHANGES file.
179
180WHAT'S NEW IN 1.0.5 ?
181
182 See the CHANGES file.
183
184WHAT'S NEW IN 1.0.6 ?
185
186 See the CHANGES file.
187
188
189I hope you find bzip2 useful. Feel free to contact me at 168I hope you find bzip2 useful. Feel free to contact me at
190 jseward@acm.org 169 jseward@acm.org
191if you have any suggestions or queries. Many people mailed me with 170if you have any suggestions or queries. Many people mailed me with
diff --git a/README.COMPILATION.PROBLEMS b/README.COMPILATION.PROBLEMS
index 14ddd1b..d420854 100644
--- a/README.COMPILATION.PROBLEMS
+++ b/README.COMPILATION.PROBLEMS
@@ -12,7 +12,7 @@ This program is released under the terms of the license contained
12in the file LICENSE. 12in the file LICENSE.
13------------------------------------------------------------------ 13------------------------------------------------------------------
14 14
15bzip2-1.0.6 should compile without problems on the vast majority of 15bzip2 should compile without problems on the vast majority of
16platforms. Using the supplied Makefile, I've built and tested it 16platforms. Using the supplied Makefile, I've built and tested it
17myself for x86-linux and amd64-linux. With makefile.msc, Visual C++ 17myself for x86-linux and amd64-linux. With makefile.msc, Visual C++
186.0 and nmake, you can build a native Win32 version too. Large file 186.0 and nmake, you can build a native Win32 version too. Large file
diff --git a/bzip2.c b/bzip2.c
index 63649f6..4804e80 100644
--- a/bzip2.c
+++ b/bzip2.c
@@ -1609,7 +1609,7 @@ void license ( void )
1609 " \n" 1609 " \n"
1610 " This program is free software; you can redistribute it and/or modify\n" 1610 " This program is free software; you can redistribute it and/or modify\n"
1611 " it under the terms set out in the LICENSE file, which is included\n" 1611 " it under the terms set out in the LICENSE file, which is included\n"
1612 " in the bzip2-1.0.6 source distribution.\n" 1612 " in the bzip2 source distribution.\n"
1613 " \n" 1613 " \n"
1614 " This program is distributed in the hope that it will be useful,\n" 1614 " This program is distributed in the hope that it will be useful,\n"
1615 " but WITHOUT ANY WARRANTY; without even the implied warranty of\n" 1615 " but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
diff --git a/manual.xml b/manual.xml
index a7fbcb3..b177bbf 100644
--- a/manual.xml
+++ b/manual.xml
@@ -9,7 +9,7 @@
9<book lang="en" id="userman" xreflabel="bzip2 Manual"> 9<book lang="en" id="userman" xreflabel="bzip2 Manual">
10 10
11 <bookinfo> 11 <bookinfo>
12 <title>bzip2 and libbzip2, version 1.0.6</title> 12 <title>bzip2 and libbzip2, version &bz-version;</title>
13 <subtitle>A program and library for data compression</subtitle> 13 <subtitle>A program and library for data compression</subtitle>
14 <copyright> 14 <copyright>
15 <year>&bz-lifespan;</year> 15 <year>&bz-lifespan;</year>
@@ -139,7 +139,7 @@ else.</para>
139 139
140 <listitem><para><computeroutput>bzip2</computeroutput>, 140 <listitem><para><computeroutput>bzip2</computeroutput>,
141 <computeroutput>bunzip2</computeroutput> - a block-sorting file 141 <computeroutput>bunzip2</computeroutput> - a block-sorting file
142 compressor, v1.0.6</para></listitem> 142 compressor, v&bz-version;</para></listitem>
143 143
144 <listitem><para><computeroutput>bzcat</computeroutput> - 144 <listitem><para><computeroutput>bzcat</computeroutput> -
145 decompresses files to stdout</para></listitem> 145 decompresses files to stdout</para></listitem>
diff --git a/prepare-release.sh b/prepare-release.sh
new file mode 100755
index 0000000..db736b7
--- /dev/null
+++ b/prepare-release.sh
@@ -0,0 +1,80 @@
1#!/bin/bash
2
3# Script to run to prepare a new release.
4# It will update the release number and tell you to update the
5# CHANGES file and to double check everything looks before doing
6# the release commit and tagging.
7
8# Afterwards you probably want to run release-update.sh to upload
9# the release and update the website at https://sourceware.org/bzip2/
10
11# Any error is fatal
12set -e
13
14# We take one argument, the version (e.g. 1.0.7)
15if [ $# -ne 1 ]; then
16 echo "$0 <version> (e.g. 1.0.7)"
17 exit 1
18fi
19
20LANG=C
21VERSION="$1"
22DATE=$(date +"%d %B %Y")
23
24# Replace the version strings in the comments
25VER_PREFIX="bzip2/libbzip2 version "
26sed -i -e "s@${VER_PREFIX}[0-9].*@${VER_PREFIX}${VERSION} of ${DATE}@" \
27 CHANGES LICENSE README* *.c *.h *.pl *.sh
28
29# 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)" \
35 >> README
36
37# Update manual
38sed -i -e "s@ENTITY bz-version \".*\"@ENTITY bz-version \"$VERSION\"@" \
39 -e "s@ENTITY bz-date \".*\"@ENTITY bz-date \"$DAY $MONTH $YEAR\"@" \
40 entities.xml
41
42# bzip2.1 should really be generated from the manual.xml, but currently
43# isn't, so explicitly change it here too.
44sed -i -e "s@This manual page pertains to version .* of@This manual page pertains to version $VERSION of@" \
45 -e "s@sorting file compressor, v.*@sorting file compressor, v$VERSION@" \
46 bzip2.1* bzip2.txt
47
48# Update sources. All sources, use bzlib_private.
49# Except bzip2recover, which embeds a version string...
50sed -i -e "s@^#define BZ_VERSION \".*\"@#define BZ_VERSION \"${VERSION}, ${DAY}-${SHORTMONTH}-${YEAR}\"@" \
51 bzlib_private.h
52sed -i -e "s@\"bzip2recover .*: extracts blocks from damaged@\"bzip2recover ${VERSION}: extracts blocks from damaged@" \
53 bzip2recover.c
54
55# And finally update the version/dist/so_name in the Makefiles.
56sed -i -e "s@^DISTNAME=bzip2-.*@DISTNAME=bzip2-${VERSION}@" \
57 Makefile
58sed -i -e "s@libbz2\.so\.[0-9]\.[0-9]\.[0-9]*@libbz2\.so\.${VERSION}@" \
59 Makefile-libbz2_so
60
61echo "Now make sure the diff looks correct:"
62echo " git diff"
63echo
64echo "And make sure there is a $VERSION section in the CHANGES file."
65echo
66echo "Double check:"
67echo " make clean && make dist && make clean && make -f Makefile-libbz2_so"
68echo
69echo "Does everything look fine?"
70echo
71echo "git commit -a -m \"Prepare for $VERSION release.\""
72echo "git push"
73echo
74echo "Wait for the buildbot to give the all green!"
75echo "Then..."
76echo
77echo "git tag -s -m \"bzip2 $VERSION release\" bzip2-$VERSION"
78echo "git push --tags"
79echo
80echo "./release-update.sh"
diff --git a/release-update.sh b/release-update.sh
index 2ad32ce..d641ca6 100755
--- a/release-update.sh
+++ b/release-update.sh
@@ -24,6 +24,7 @@ echo "Requires a sourceware account in the bzip2 group."
24echo 24echo
25echo "Make sure the git repo was tagged, signed and pushed" 25echo "Make sure the git repo was tagged, signed and pushed"
26echo "If not, please double check the source tree is release ready first" 26echo "If not, please double check the source tree is release ready first"
27echo "You probably want to run ./prepare-release.sh $VERSION first."
27echo "Then do:" 28echo "Then do:"
28echo 29echo
29echo " git tag -s -m \"bzip2 $VERSION release\" bzip2-$VERSION" 30echo " git tag -s -m \"bzip2 $VERSION release\" bzip2-$VERSION"