Add escript post_hooks

This commit is contained in:
Hans Svensson 2019-01-30 10:55:11 +01:00
parent 65b6791176
commit 362373c0d7
2 changed files with 14 additions and 7 deletions

View File

@ -1,15 +1,24 @@
{erl_opts, [debug_info]}.
{escript_name, aesophia}.
{provider_hooks, [{post, [{compile, escriptize}]}]}.
%% NOTE: When possible deps are referenced by Git ref to ensure consistency between builds.
{deps, [ {aebytecode, {git, "https://github.com/aeternity/aebytecode.git",
{ref,"99bf097"}}}
, {getopt, "1.0.1"}
]}.
{escript_incl_apps, [aesophia, aebytecode, getopt]}.
{escript_main_app, aesophia}.
{escript_name, aesophia}.
{escript_emu_args, "%%! +sbtu +A0\n"}.
{provider_hooks, [{post, [{compile, escriptize}]}]}.
{post_hooks, [{"(linux|darwin|solaris|freebsd|netbsd|openbsd)",
escriptize,
"cp \"$REBAR_BUILD_DIR/bin/aesophia\" ./aesophia"},
{"win32",
escriptize,
"robocopy \"%REBAR_BUILD_DIR%/bin/\" ./ aesophia* "
"/njs /njh /nfl /ndl & exit /b 0"} % silence things
]}.
{dialyzer, [
{warnings, [unknown]},

View File

@ -255,5 +255,3 @@ read_contract(Name) ->
{ok, Bin} = file:read_file(Name),
binary_to_list(Bin).
contract_path() ->
"apps/aesophia/test/contracts".