瀏覽代碼

Merge pull request #1668 from ferd/fix-make_vsn-custom-resources

Fix compilation for custom resources dynamic vsn
pull/1669/head
Fred Hebert 7 年之前
committed by GitHub
父節點
當前提交
a00f04273d
沒有發現已知的金鑰在資料庫的簽署中 GPG Key ID: 4AEE18F83AFDEB23
共有 1 個文件被更改,包括 12 次插入1 次删除
  1. +12
    -1
      src/rebar_prv_compile.erl

+ 12
- 1
src/rebar_prv_compile.erl 查看文件

@ -136,7 +136,18 @@ compile(State, Providers, AppInfo) ->
AppInfo3 = rebar_hooks:run_all_hooks(AppDir, post, ?ERLC_HOOK, Providers, AppInfo2, State),
AppInfo4 = rebar_hooks:run_all_hooks(AppDir, pre, ?APP_HOOK, Providers, AppInfo3, State),
case rebar_otp_app:compile(State, AppInfo4) of
%% Load plugins back for make_vsn calls in custom resources.
%% The rebar_otp_app compilation step is safe regarding the
%% overall path management, so we can just load all plugins back
%% in memory.
PluginDepsPaths = rebar_state:code_paths(State, all_plugin_deps),
code:add_pathsa(PluginDepsPaths),
AppFileCompileResult = rebar_otp_app:compile(State, AppInfo4),
%% Clean up after ourselves, leave things as they were.
rebar_utils:remove_from_code_path(PluginDepsPaths),
case AppFileCompileResult of
{ok, AppInfo5} ->
AppInfo6 = rebar_hooks:run_all_hooks(AppDir, post, ?APP_HOOK, Providers, AppInfo5, State),
AppInfo7 = rebar_hooks:run_all_hooks(AppDir, post, ?PROVIDER, Providers, AppInfo6, State),

Loading…
取消
儲存