summaryrefslogtreecommitdiff
path: root/bootstrap
diff options
context:
space:
mode:
authorDave Smith <dizzyd@dizzyd.com>2010-06-22 13:47:06 -0600
committerDave Smith <dizzyd@dizzyd.com>2010-06-22 13:47:06 -0600
commit02bc52fc6aaca0ddb66dbe9e586df10ac82c6bce (patch)
tree76f98cf79eba9904626e78d273942a8280f6da55 /bootstrap
parent518d30d7ad4205f88951493905f81dfc6fe02b13 (diff)
downloadrebar-02bc52fc6aaca0ddb66dbe9e586df10ac82c6bce.tar.gz
Add support for embedding VCS info into the version data
Diffstat (limited to 'bootstrap')
-rwxr-xr-xbootstrap6
1 files changed, 5 insertions, 1 deletions
diff --git a/bootstrap b/bootstrap
index cbd17c3..d9327ba 100755
--- a/bootstrap
+++ b/bootstrap
@@ -6,6 +6,9 @@ main(Args) ->
%% Get a string repr of build time
Built = build_time(),
+ %% Get a string repr of hg changeset
+ HgInfo = "hg " ++ string:strip(os:cmd("hg identify -i"), both, $\n),
+
%% Check for force=1 flag to force a rebuild
case lists:member("force=1", Args) of
true ->
@@ -17,7 +20,8 @@ main(Args) ->
%% Compile all src/*.erl to ebin
case make:files(filelib:wildcard("src/*.erl"), [{outdir, "ebin"}, {i, "include"},
- {d, 'BUILD_TIME', Built}]) of
+ {d, 'BUILD_TIME', Built},
+ {d, 'VCS_INFO', HgInfo}]) of
up_to_date ->
ok;
error ->