summaryrefslogtreecommitdiff
path: root/release.sh
diff options
context:
space:
mode:
authorThorsten Wißmann <edu@thorsten-wissmann.de>2012-12-31 11:49:51 +0100
committerThorsten Wißmann <edu@thorsten-wissmann.de>2012-12-31 12:43:31 +0100
commit92916d98221acb00c11cf844f562b531ff724cb1 (patch)
tree26dcb9f7fa00267c119fcba4e6883bf20e9c42b7 /release.sh
parent13493bcefd5246d76c7b382a3915d6a7c32ca9e6 (diff)
Update release.sh to handle patchlevel number
Diffstat (limited to 'release.sh')
-rwxr-xr-xrelease.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/release.sh b/release.sh
index 0dfe8455..31ea2287 100755
--- a/release.sh
+++ b/release.sh
@@ -3,7 +3,7 @@
VERSION="$1"
if [ -z "$1" ] || [ "$1" = -h ] ; then
- echo "$0 VERSIONMAJOR.VERSIONMINOR"
+ echo "$0 VERSIONMAJOR.VERSIONMINOR.VERSIONPATCH"
echo " Releases the specified version (tagging and tarball creation)"
exit 0
fi
@@ -13,14 +13,14 @@ if git status --porcelain | grep '^ M' ; then
exit 1
fi
-VERSION_MAJOR="${VERSION%.*}"
-VERSION_MINOR="${VERSION#*.}"
+VERSIONARGS=( $(tr . ' ' <<< "$VERSION") )
echo "==> Release commit"
echo ":: Patching version.mk"
-sed -i "s/^VERSION_MAJOR.*$/VERSION_MAJOR = $VERSION_MAJOR/" version.mk
-sed -i "s/^VERSION_MINOR.*$/VERSION_MINOR = $VERSION_MINOR/" version.mk
+sed -i "s/^VERSION_MAJOR.*$/VERSION_MAJOR = ${VERSIONARGS[0]}/" version.mk
+sed -i "s/^VERSION_MINOR.*$/VERSION_MINOR = ${VERSIONARGS[1]}/" version.mk
+sed -i "s/^VERSION_PATCH.*$/VERSION_PATCH = ${VERSIONARGS[2]}/" version.mk
echo ":: Patching NEWS"
date=$(date +%Y-%m-%d)