[clinfo] 129/148: Script to update the version string

Andreas Beckmann anbe at moszumanska.debian.org
Mon Nov 17 14:09:55 UTC 2014


This is an automated email from the git hooks/post-receive script.

anbe pushed a commit to branch clinfo
in repository clinfo.

commit b0a04570e385620839e5ef185eaec538e8f5e823
Author: Giuseppe Bilotta <giuseppe.bilotta at gmail.com>
Date:   Fri Nov 7 17:57:46 2014 +0100

    Script to update the version string
---
 new-version.sh | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/new-version.sh b/new-version.sh
new file mode 100755
index 0000000..3f6d312
--- /dev/null
+++ b/new-version.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+# Change the version recorded in src/clinfo.c and man/clinfo.1 to
+# the current highest OpenCL supported standard followed by current
+# yy.mm.dd
+
+abort() {
+	echo "$1" >&2
+	exit 1
+}
+
+test -n "$(git status --porcelain | grep -v '??')" && abort "Uncommited changes, aborting"
+
+DATE=$(date +%Y-%m-%d)
+MAJOR=$(awk '/^OpenCL/ { print $NF ; quit }' man/clinfo.1)
+SUBV=$(date +%y.%m.%d)
+VERSION="$MAJOR$SUBV"
+
+
+sed -i -e "/clinfo version/ s/version \S\+\"/version $VERSION\"/" src/clinfo.c
+sed -i -e "1 s/\".\+$/\"$DATE\" \"clinfo $VERSION\"/" man/clinfo.1
+
+git commit -m "Version $VERSION" -e -a
+

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opencl/clinfo.git



More information about the Pkg-opencl-commits mailing list