You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ja...@apache.org on 2016/02/22 12:25:02 UTC

couch commit: updated refs/heads/fix-tarball-build to 882e4d1

Repository: couchdb-couch
Updated Branches:
  refs/heads/fix-tarball-build [created] 882e4d1af


fix tarball build


Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch/commit/882e4d1a
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch/tree/882e4d1a
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch/diff/882e4d1a

Branch: refs/heads/fix-tarball-build
Commit: 882e4d1af427ad2ec27310f969834108ebfa484b
Parents: f3b7f5a
Author: Jan Lehnardt <ja...@apache.org>
Authored: Mon Feb 22 12:22:57 2016 +0100
Committer: Jan Lehnardt <ja...@apache.org>
Committed: Mon Feb 22 12:22:57 2016 +0100

----------------------------------------------------------------------
 rebar.config.script | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/882e4d1a/rebar.config.script
----------------------------------------------------------------------
diff --git a/rebar.config.script b/rebar.config.script
index e989ab2..457d975 100644
--- a/rebar.config.script
+++ b/rebar.config.script
@@ -32,7 +32,15 @@ CouchJSName = case os:type() of
         "couchjs"
 end,
 CouchJSPath = filename:join(["priv", CouchJSName]),
-Version = string:strip(os:cmd("git describe --always"), right, $\n),
+Version0 = string:strip(os:cmd("git describe --always"), right, $\n),
+% When we are not building from a git checkout, the above will fail.
+% If that is the case, we use the COUCHDB_VERSION variable that has
+% been set by the top level Makefile
+Version = case Version0 of
+    "fatal:" ++ _Msg ->
+        os:getenv("COUCHDB_VERSION");
+    _ -> Version0
+end,
 
 CouchConfig = case filelib:is_file(os:getenv("COUCHDB_CONFIG")) of
     true ->