summaryrefslogtreecommitdiff
path: root/build/bump-version.sh
diff options
context:
space:
mode:
authorTim Kientzle <kientzle@gmail.com>2009-12-13 21:54:07 -0500
committerTim Kientzle <kientzle@gmail.com>2009-12-13 21:54:07 -0500
commit192fd4ff94d3ddf8291de20e55d31baafc5c2de9 (patch)
tree741f10b8f9a29c013da64f8c8f41d6accdf73499 /build/bump-version.sh
parent9ea0216934ca94461eab95c3c6c5f316a158f772 (diff)
downloadlibarchive-192fd4ff94d3ddf8291de20e55d31baafc5c2de9.tar.gz
Refactor the release-building scripts just a bit:
* bump-version.sh actually bumps the 'version' value * clean.sh attempts to clean the local directory as thoroughly as possible * autogen.sh runs clean.sh, edits the current version value into configure.ac, archive.h, and archive_entry.h, re-runs autoconf/automake/etc, and does a ./configure && make distcheck to verify the distribution on the local system. SVN-Revision: 1736
Diffstat (limited to 'build/bump-version.sh')
-rwxr-xr-xbuild/bump-version.sh36
1 files changed, 36 insertions, 0 deletions
diff --git a/build/bump-version.sh b/build/bump-version.sh
new file mode 100755
index 00000000..0304cf3f
--- /dev/null
+++ b/build/bump-version.sh
@@ -0,0 +1,36 @@
+#!/bin/sh +v
+
+# Start from the build directory, where the version file is located
+if [ -f build/version ]; then
+ cd build
+fi
+
+if [ \! -f version ]; then
+ echo "Can't find version file"
+ exit 1
+fi
+
+# Update the build number in the 'version' file.
+# Separate number from additional alpha/beta/etc marker
+MARKER=`cat version | sed 's/[0-9.]//g'`
+# Bump the number
+VN=`cat version | sed 's/[^0-9.]//g'`
+# Reassemble and write back out
+VN=$(($VN + 1))
+rm -f version.old
+mv version version.old
+chmod +w version.old
+echo $VN$MARKER > version
+VS="$(($VN/1000000)).$(( ($VN/1000)%1000 )).$(( $VN%1000 ))$MARKER"
+cd ..
+
+ANNOUNCE=`date +"%b %d, %Y:"`" libarchive $VS released"
+
+echo $ANNOUNCE
+
+# Add a version notice to NEWS
+mv NEWS NEWS.bak
+chmod +w NEWS.bak
+echo > NEWS
+echo $ANNOUNCE >> NEWS
+cat NEWS.bak >> NEWS