summaryrefslogtreecommitdiff
path: root/version.sh
diff options
context:
space:
mode:
authorDustin Sallings <dustin@spy.net>2009-03-09 11:52:25 -0700
committerDustin Sallings <dustin@spy.net>2009-03-26 11:55:26 -0700
commit923a335bf8613696d658448cd9c48a963924d436 (patch)
treec8f9f6e8fad4dcfb02e79574fb544ba8281766d0 /version.sh
parent496384caa61e4f577196db51aea259a642a27d4a (diff)
downloadmemcached-923a335bf8613696d658448cd9c48a963924d436.tar.gz
Use git's version number for releases.
This will allow more specific version numbers, while simplifying a proper release down to a tag and make dist. During development, ./version.sh needs to run periodically to update the version number. I'd recommend just adding a call to version.sh as a git post commit hook: % cat .git/hooks/post-commit echo "Updating version." ./version.sh (and make sure the file is executable)
Diffstat (limited to 'version.sh')
-rwxr-xr-xversion.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/version.sh b/version.sh
new file mode 100755
index 0000000..8a58aef
--- /dev/null
+++ b/version.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+if git describe > version.tmp
+then
+ echo "m4_define([VERSION_NUMBER], [`tr -d '\n' < version.tmp`])" \
+ > version.m4
+fi
+rm version.tmp