Skip to content

Commit

Permalink
apply variables from sys.config when building with bert generator
Browse files Browse the repository at this point in the history
  • Loading branch information
5HT committed Apr 12, 2019
1 parent 2ae2efa commit 5e6089d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion include/mad.hrl
Original file line number Diff line number Diff line change
@@ -1 +1 @@
-define(VERSION,"b2bd86").
-define(VERSION,"2ae2ef").
Binary file modified mad
Binary file not shown.
6 changes: 6 additions & 0 deletions src/compile/mad_compile.erl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@ compile(Params) ->
SysConfig = try {ok,[S]} = file:consult("sys.config"), S catch _:_ -> [] end,
BERT = proplists:get_value(bert,SysConfig,[]),
JS = proplists:get_value(js,BERT,[]),
ERL = proplists:get_value(erl,BERT,[]),
SWIFT = proplists:get_value(swift,BERT,[]),
GOOGLE = proplists:get_value(google,BERT,[]),
application:set_env(bert,js,JS),
application:set_env(bert,erl,ERL),
application:set_env(bert,swift,SWIFT),
application:set_env(bert,google,GOOGLE),
case mad_utils:configs() of
{error,E} -> {error,E};
{ok,{ Cwd, ConfigFile, Conf }} ->
Expand Down

0 comments on commit 5e6089d

Please sign in to comment.