aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2017-10-23 21:51:16 +0100
committerLoïc Hoguin <[email protected]>2017-10-23 21:51:16 +0100
commitb215f30832b14dae31a69021dd2dc2298cda4116 (patch)
tree583597087cad35ea605ffe32425fa9a46524f700 /core
parent522c4f52f511d7f2dc4a9166a5dbbeb282e5c8fa (diff)
downloaderlang.mk-b215f30832b14dae31a69021dd2dc2298cda4116.tar.gz
erlang.mk-b215f30832b14dae31a69021dd2dc2298cda4116.tar.bz2
erlang.mk-b215f30832b14dae31a69021dd2dc2298cda4116.zip
Masquerade the version when {vsn, {cmd, "..."}} is used
Ew, rebar, again!
Diffstat (limited to 'core')
-rw-r--r--core/deps.mk6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/deps.mk b/core/deps.mk
index 58466a6..1ffae2a 100644
--- a/core/deps.mk
+++ b/core/deps.mk
@@ -493,7 +493,11 @@ 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 {_, git} -> lists:keyreplace(vsn, 1, L1, {vsn, "git"}); _ -> L1 end,
+ L2 = case lists:keyfind(vsn, 1, L1) of
+ {_, git} -> lists:keyreplace(vsn, 1, L1, {vsn, "git"});
+ {_, {cmd, _}} -> lists:keyreplace(vsn, 1, L1, {vsn, "cmd"});
+ _ -> 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