diff options
author | Loïc Hoguin <[email protected]> | 2015-06-27 20:34:18 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2015-06-27 20:34:18 +0200 |
commit | 9a2dd5dfb20b2b5dbb08d9441a184815b5337cbe (patch) | |
tree | 7686405ef1e06de3222490c008aacdc30e81f343 /core | |
parent | 8ce44651d51c8f860c4d433bf16d5a723e1f5cc0 (diff) | |
download | erlang.mk-9a2dd5dfb20b2b5dbb08d9441a184815b5337cbe.tar.gz erlang.mk-9a2dd5dfb20b2b5dbb08d9441a184815b5337cbe.tar.bz2 erlang.mk-9a2dd5dfb20b2b5dbb08d9441a184815b5337cbe.zip |
Add registered field if missing from .app.src
Diffstat (limited to 'core')
-rw-r--r-- | core/deps.mk | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/deps.mk b/core/deps.mk index 9d17362..9f36be6 100644 --- a/core/deps.mk +++ b/core/deps.mk @@ -466,8 +466,9 @@ define dep_autopatch_appsrc.erl true -> {ok, [{application, $(1), L0}]} = file:consult(AppSrcIn), L1 = lists:keystore(modules, 1, L0, {modules, []}), - L2 = case lists:keyfind(vsn, 1, L1) of {vsn, git} -> lists:keyreplace(vsn, 1, L1, {vsn, "git"}); _ -> L1 end, - ok = file:write_file(AppSrcOut, io_lib:format("~p.~n", [{application, $(1), L2}])), + L2 = case lists:keyfind(vsn, 1, L1) of {_, git} -> lists:keyreplace(vsn, 1, L1, {vsn, "git"}); _ -> L1 end, + L3 = case lists:keyfind(registered, 1, L2) of false -> [{registered, []}|L2]; _ -> L2 end, + ok = file:write_file(AppSrcOut, io_lib:format("~p.~n", [{application, $(1), L3}])), case AppSrcOut of AppSrcIn -> ok; _ -> ok = file:delete(AppSrcIn) end end, halt() |