Skip to content
Snippets Groups Projects
Commit 9422a37c2586 authored by Mark Wielaard's avatar Mark Wielaard
Browse files

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.
parent d60b0160af9a
No related branches found
No related tags found
No related merge requests found
...@@ -161,15 +161,7 @@ ...@@ -161,15 +161,7 @@
* Many small improvements in file and flag handling. * Many small improvements in file and flag handling.
* A Y2K statement. * A Y2K statement.
WHAT'S NEW IN 1.0.0 ? WHAT'S NEW IN 1.0.x ?
See the CHANGES file.
WHAT'S NEW IN 1.0.2 ?
See the CHANGES file.
WHAT'S NEW IN 1.0.3 ?
See the CHANGES file. See the CHANGES file.
...@@ -173,19 +165,6 @@ ...@@ -173,19 +165,6 @@
See the CHANGES file. See the CHANGES file.
WHAT'S NEW IN 1.0.4 ?
See the CHANGES file.
WHAT'S NEW IN 1.0.5 ?
See the CHANGES file.
WHAT'S NEW IN 1.0.6 ?
See the CHANGES file.
I hope you find bzip2 useful. Feel free to contact me at I hope you find bzip2 useful. Feel free to contact me at
jseward@acm.org jseward@acm.org
if you have any suggestions or queries. Many people mailed me with if you have any suggestions or queries. Many people mailed me with
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
in the file LICENSE. in the file LICENSE.
------------------------------------------------------------------ ------------------------------------------------------------------
bzip2-1.0.6 should compile without problems on the vast majority of bzip2 should compile without problems on the vast majority of
platforms. Using the supplied Makefile, I've built and tested it platforms. Using the supplied Makefile, I've built and tested it
myself for x86-linux and amd64-linux. With makefile.msc, Visual C++ myself for x86-linux and amd64-linux. With makefile.msc, Visual C++
6.0 and nmake, you can build a native Win32 version too. Large file 6.0 and nmake, you can build a native Win32 version too. Large file
......
...@@ -1609,7 +1609,7 @@ ...@@ -1609,7 +1609,7 @@
" \n" " \n"
" This program is free software; you can redistribute it and/or modify\n" " This program is free software; you can redistribute it and/or modify\n"
" it under the terms set out in the LICENSE file, which is included\n" " it under the terms set out in the LICENSE file, which is included\n"
" in the bzip2-1.0.6 source distribution.\n" " in the bzip2 source distribution.\n"
" \n" " \n"
" This program is distributed in the hope that it will be useful,\n" " This program is distributed in the hope that it will be useful,\n"
" but WITHOUT ANY WARRANTY; without even the implied warranty of\n" " but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<book lang="en" id="userman" xreflabel="bzip2 Manual"> <book lang="en" id="userman" xreflabel="bzip2 Manual">
<bookinfo> <bookinfo>
<title>bzip2 and libbzip2, version 1.0.6</title> <title>bzip2 and libbzip2, version &bz-version;</title>
<subtitle>A program and library for data compression</subtitle> <subtitle>A program and library for data compression</subtitle>
<copyright> <copyright>
<year>&bz-lifespan;</year> <year>&bz-lifespan;</year>
...@@ -139,7 +139,7 @@ ...@@ -139,7 +139,7 @@
<listitem><para><computeroutput>bzip2</computeroutput>, <listitem><para><computeroutput>bzip2</computeroutput>,
<computeroutput>bunzip2</computeroutput> - a block-sorting file <computeroutput>bunzip2</computeroutput> - a block-sorting file
compressor, v1.0.6</para></listitem> compressor, v&bz-version;</para></listitem>
<listitem><para><computeroutput>bzcat</computeroutput> - <listitem><para><computeroutput>bzcat</computeroutput> -
decompresses files to stdout</para></listitem> decompresses files to stdout</para></listitem>
......
#!/bin/bash
# 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/
# Any error is fatal
set -e
# We take one argument, the version (e.g. 1.0.7)
if [ $# -ne 1 ]; then
echo "$0 <version> (e.g. 1.0.7)"
exit 1
fi
LANG=C
VERSION="$1"
DATE=$(date +"%d %B %Y")
# Replace the version strings 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
# 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\"@" \
entities.xml
# bzip2.1 should really be generated from the manual.xml, but currently
# isn't, so explicitly change it here too.
sed -i -e "s@This manual page pertains to version .* of@This manual page pertains to version $VERSION of@" \
-e "s@sorting file compressor, v.*@sorting file compressor, v$VERSION@" \
bzip2.1* bzip2.txt
# Update sources. All sources, use bzlib_private.
# Except bzip2recover, which embeds a version string...
sed -i -e "s@^#define BZ_VERSION \".*\"@#define BZ_VERSION \"${VERSION}, ${DAY}-${SHORTMONTH}-${YEAR}\"@" \
bzlib_private.h
sed -i -e "s@\"bzip2recover .*: extracts blocks from damaged@\"bzip2recover ${VERSION}: extracts blocks from damaged@" \
bzip2recover.c
# And finally update the version/dist/so_name in the Makefiles.
sed -i -e "s@^DISTNAME=bzip2-.*@DISTNAME=bzip2-${VERSION}@" \
Makefile
sed -i -e "s@libbz2\.so\.[0-9]\.[0-9]\.[0-9]*@libbz2\.so\.${VERSION}@" \
Makefile-libbz2_so
echo "Now make sure the diff looks correct:"
echo " git diff"
echo
echo "And make sure there is a $VERSION section in the CHANGES file."
echo
echo "Double check:"
echo " make clean && make dist && make clean && make -f Makefile-libbz2_so"
echo
echo "Does everything look fine?"
echo
echo "git commit -a -m \"Prepare for $VERSION release.\""
echo "git push"
echo
echo "Wait for the buildbot to give the all green!"
echo "Then..."
echo
echo "git tag -s -m \"bzip2 $VERSION release\" bzip2-$VERSION"
echo "git push --tags"
echo
echo "./release-update.sh"
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
echo echo
echo "Make sure the git repo was tagged, signed and pushed" echo "Make sure the git repo was tagged, signed and pushed"
echo "If not, please double check the source tree is release ready first" echo "If not, please double check the source tree is release ready first"
echo "You probably want to run ./prepare-release.sh $VERSION first."
echo "Then do:" echo "Then do:"
echo echo
echo " git tag -s -m \"bzip2 $VERSION release\" bzip2-$VERSION" echo " git tag -s -m \"bzip2 $VERSION release\" bzip2-$VERSION"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment