summaryrefslogtreecommitdiff
path: root/rebar.config.script
diff options
context:
space:
mode:
authorBadlop <badlop@process-one.net>2021-06-27 17:08:21 +0200
committerBadlop <badlop@process-one.net>2021-06-27 17:32:09 +0200
commit774de2bdc5f557a9a5e7375175db2e715db368f8 (patch)
treedd437628c83aa25bbc1e8c06e57b8f701593cb72 /rebar.config.script
parentCopy captcha scripts in release (#3633) (diff)
Include odbc app in release only when required (#3633)
Diffstat (limited to 'rebar.config.script')
-rw-r--r--rebar.config.script13
1 files changed, 12 insertions, 1 deletions
diff --git a/rebar.config.script b/rebar.config.script
index 9e47b70e..efd51d6b 100644
--- a/rebar.config.script
+++ b/rebar.config.script
@@ -339,6 +339,17 @@ fun(Deps, FDeps) ->
end, Deps)
end,
+
+VarsApps = case file:consult(filename:join([filename:dirname(SCRIPT),"vars.config"])) of
+ {ok, TermsV} ->
+ case proplists:get_bool(odbc, TermsV) of
+ true -> [odbc];
+ false -> []
+ end;
+ _->
+ []
+ end,
+
ProcessRelx = fun(Relx, Deps) ->
{value, {release, NameVersion, DefaultApps}, RelxTail} = lists:keytake(release, 1, Relx),
ProfileApps = case os:getenv("REBAR_PROFILE") of
@@ -348,7 +359,7 @@ ProcessRelx = fun(Relx, Deps) ->
DepApps = lists:map(fun({DepName, _, _}) -> DepName;
({DepName, _}) -> DepName
end, Deps),
- [{release, NameVersion, DefaultApps ++ ProfileApps ++ DepApps} | RelxTail]
+ [{release, NameVersion, DefaultApps ++ VarsApps ++ ProfileApps ++ DepApps} | RelxTail]
end,
GithubConfig = case {os:getenv("GITHUB_ACTIONS"), os:getenv("GITHUB_TOKEN")} of