summaryrefslogtreecommitdiff
path: root/bootstrap
diff options
context:
space:
mode:
authorJan Lehnardt <jan@apache.org>2009-09-12 22:33:23 +0000
committerJan Lehnardt <jan@apache.org>2009-09-12 22:33:23 +0000
commit88cebc6db367f0619eefac55c01d4ca532278a54 (patch)
tree328a675022814d7b9a4521145946c56be1f30ea9 /bootstrap
parentc82008d34e656821ff46edfb88075f590ae099b0 (diff)
use first 8 bytes of the commit hash as the release info when building from git
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@814245 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'bootstrap')
-rwxr-xr-xbootstrap7
1 files changed, 6 insertions, 1 deletions
diff --git a/bootstrap b/bootstrap
index ebc3ffb4..8cfc2c01 100755
--- a/bootstrap
+++ b/bootstrap
@@ -32,7 +32,12 @@ get () {
mkdir -p build-aux
if test -z "$REVISION"; then
- REVISION=`\`which svn\` info . 2> /dev/null | awk "/Revision:/{print \\$2}"`
+ if test -d .git; then
+ REVISION=`git log | head -1 | awk '{print $2}' | cut -b 1-8`-git
+ else
+ # default to svn
+ REVISION=`\`which svn\` info . 2> /dev/null | awk "/Revision:/{print \\$2}"`
+ fi
fi
if test -z "`get LOCAL_VERSION_STAGE`" -o -z "$REVISION"; then
sed "s/%release%//" < acinclude.m4.in > acinclude.m4