about summary refs log tree commit diff stats
path: root/gen-version.sh
diff options
context:
space:
mode:
authorLars Hjemli2007-06-18 09:42:10 +0200
committerLars Hjemli2007-06-18 10:38:40 +0200
commitf69250358a74efa5d7d9c562b2cdd80fad1430f1 (patch)
tree19c0ddab227d1c27a49046e559618cd067169591 /gen-version.sh
parentAdd cgit_diff_link() (diff)
downloadcgit-f69250358a74efa5d7d9c562b2cdd80fad1430f1.tar.gz
cgit-f69250358a74efa5d7d9c562b2cdd80fad1430f1.zip
Add version info from git-describe
A new script, gen-version.sh, is now invoked from 'make version' to generate
the file VERSION. This file contains a version identifier generated by
git-describe and is included in the Makefile.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (limited to 'gen-version.sh')
-rwxr-xr-xgen-version.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/gen-version.sh b/gen-version.sh new file mode 100755 index 0000000..4c60f60 --- /dev/null +++ b/gen-version.sh
@@ -0,0 +1,4 @@
1v=$(git-describe --abbrev=4 HEAD | sed -e 's/-/./g')
2test -z "$v" && exit 1
3echo "CGIT_VERSION = $v"
4echo "CGIT_VERSION = $v" > VERSION