summaryrefslogtreecommitdiff
path: root/src/rebar_otp_app.erl
diff options
context:
space:
mode:
authorTristan Sloughter <t@crashfast.com>2015-05-07 18:36:15 -0500
committerTristan Sloughter <t@crashfast.com>2015-05-07 18:36:15 -0500
commitc7281abb309283011bd2ef9cdf8da54ddd858aa1 (patch)
tree0a1fe31b0cfbb2ee0f3bdfb0fc0c7b3cb6cbc46c /src/rebar_otp_app.erl
parentb3d444ef67f91815d4ac12a393b5e905b01ebcc3 (diff)
parent3edede54e759f8494981bb2e6380b7eee437b7f3 (diff)
Merge branch 'fix_windows_bootstrap' of https://github.com/ingwinlu/rebar3 into ingwinlu-fix_windows_bootstrap
Diffstat (limited to 'src/rebar_otp_app.erl')
-rw-r--r--src/rebar_otp_app.erl7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/rebar_otp_app.erl b/src/rebar_otp_app.erl
index 260343d..0bf27c9 100644
--- a/src/rebar_otp_app.erl
+++ b/src/rebar_otp_app.erl
@@ -104,7 +104,7 @@ preprocess(State, AppInfo, AppSrcFile) ->
A1 = apply_app_vars(AppVars, AppData),
%% AppSrcFile may contain instructions for generating a vsn number
- Vsn = app_vsn(AppSrcFile),
+ Vsn = app_vsn(AppSrcFile, State),
A2 = lists:keystore(vsn, 1, A1, {vsn, Vsn}),
%% systools:make_relup/4 fails with {missing_param, registered}
@@ -197,11 +197,12 @@ consult_app_file(Filename) ->
end
end.
-app_vsn(AppFile) ->
+app_vsn(AppFile, State) ->
case consult_app_file(AppFile) of
{ok, [{application, _AppName, AppData}]} ->
AppDir = filename:dirname(filename:dirname(AppFile)),
- rebar_utils:vcs_vsn(get_value(vsn, AppData, AppFile), AppDir);
+ Resources = rebar_state:resources(State),
+ rebar_utils:vcs_vsn(get_value(vsn, AppData, AppFile), AppDir, Resources);
{error, Reason} ->
?ABORT("Failed to consult app file ~s: ~p\n", [AppFile, Reason])
end.