couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From iil...@apache.org
Subject [5/6] couch commit: updated refs/heads/master to 2ad85bc
Date Tue, 20 Sep 2016 17:04:08 GMT
Define COUCHDB_VERSION macro


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

Branch: refs/heads/master
Commit: 7c5615abfb4ca62bf9fd04755ccfce509c872a9a
Parents: 30cc961
Author: ILYA Khlopotov <iilyak@ca.ibm.com>
Authored: Fri Sep 16 13:13:08 2016 -0700
Committer: ILYA Khlopotov <iilyak@ca.ibm.com>
Committed: Fri Sep 16 13:42:47 2016 -0700

----------------------------------------------------------------------
 rebar.config.script  | 3 ++-
 src/couch_server.erl | 5 +----
 2 files changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/7c5615ab/rebar.config.script
----------------------------------------------------------------------
diff --git a/rebar.config.script b/rebar.config.script
index 254dcc9..8d44099 100644
--- a/rebar.config.script
+++ b/rebar.config.script
@@ -135,7 +135,8 @@ end,
 AddConfig = [
     {port_specs, PortSpecs},
     {erl_opts, [
-        {platform_define, "win32", 'WINDOWS'}
+        {platform_define, "win32", 'WINDOWS'},
+        {d, 'COUCHDB_VERSION', Version}
     ]},
     {eunit_compile_opts, [{platform_define, "win32", 'WINDOWS'}]}
 ].

http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/7c5615ab/src/couch_server.erl
----------------------------------------------------------------------
diff --git a/src/couch_server.erl b/src/couch_server.erl
index d7adf33..364cbb9 100644
--- a/src/couch_server.erl
+++ b/src/couch_server.erl
@@ -45,10 +45,7 @@ dev_start() ->
     couch:start().
 
 get_version() ->
-    case application:get_key(couch, vsn) of
-        {ok, Version} -> Version;
-        undefined -> "0.0.0"
-    end.
+    ?COUCHDB_VERSION. %% Defined in rebar.config.script
 get_version(short) ->
   %% strip git hash from version string
   [Version|_Rest] = string:tokens(get_version(), "+"),


Mime
View raw message