summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Shorin <kxepal@apache.org>2015-10-07 18:47:16 +0300
committerAlexander Shorin <kxepal@apache.org>2015-10-07 20:28:48 +0300
commit9d579fa5a0a6341a45647c4e5906a4760da6cce6 (patch)
tree390c71d4a37f563f77f9be3f4f945445eb9b933e
parente710130b3946e984cc42e6226fcc2df09b89d77c (diff)
downloadcouchdb-9d579fa5a0a6341a45647c4e5906a4760da6cce6.tar.gz
Replace git VSN on build release with commit hash
This is what rebar will try to do on make for generated tarball, but it will because missed .git directories around.
-rwxr-xr-xbuild-aux/couchdb-build-release.sh7
1 files changed, 3 insertions, 4 deletions
diff --git a/build-aux/couchdb-build-release.sh b/build-aux/couchdb-build-release.sh
index 26c754b2c..5feeb1a1b 100755
--- a/build-aux/couchdb-build-release.sh
+++ b/build-aux/couchdb-build-release.sh
@@ -26,15 +26,14 @@ for repo in *; do
mkdir ../../$RELDIR/src/$repo
git_ish=`git rev-parse --short HEAD`
git archive $git_ish | tar -xC ../../$RELDIR/src/$repo/
+ set +e
+ grep -rl '{vsn, git}' ../../$RELDIR/src/$repo/ | xargs sed -i "s/{vsn, git}/{vsn, \"`git describe --always --tags`\"}/" > /dev/null
+ set -e
cd ..
done
cd ..
-# update version
-# actual version detection TBD
-perl -pi -e "s/\{vsn, git\}/\{vsn, \"$VERSION\"\}/" $RELDIR/src/*/src/*.app.src
-
# create CONTRIBUTORS file
if test -e .git; then
OS=`uname -s`