forked from heiheshang/zotonic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrebar.config.script
34 lines (27 loc) · 958 Bytes
/
rebar.config.script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
%% Locate the optional extra checkouts directory
%% Add it to the project_app_dirs
CONFIG1 = case os:getenv("ZOTONIC_APPS") of
false ->
CONFIG;
"" ->
CONFIG;
"apps_user" ->
CONFIG;
ZotonicApps ->
AppDir = proplists:get_value(project_app_dirs, CONFIG, []),
AppDir1 = [ filename:join(ZotonicApps, "*") | AppDir ],
C1 = lists:keystore(project_app_dirs, 1, CONFIG, {project_app_dirs, AppDir1}),
ErlOpts = proplists:get_value(erl_opts, CONFIG, []),
ErlOpts1 = [ {i, ZotonicApps} | ErlOpts ],
C2 = lists:keystore(erl_opts, 1, C1, {erl_opts, ErlOpts1}),
io:format("Application Dirs:~n"),
lists:foreach(
fun(Dir) ->
io:format("- ~s~n", [Dir])
end,
proplists:get_value(project_app_dirs, C2, [])),
C2
end,
% Version = os:cmd("git describe --tags"),
% file:write_file("VERSION", Version),
CONFIG1.