Skip to content

Commit

Permalink
Merge pull request #12 from alertlogic/revert-zip-location-hack
Browse files Browse the repository at this point in the history
Revert "change zip package location to make tooling happy"
  • Loading branch information
velimir authored Nov 23, 2018
2 parents 43f1a43 + 7f5d647 commit 4ce8c49
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
10 changes: 1 addition & 9 deletions src/rebar3_erllambda_rlx_zip_prv.erl
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,10 @@ format_error(ErrorDetail) ->
%% Internal Functions
%%============================================================================
archive_path(State, Release) ->
Dir = archive_dir(State),
Dir = rlx_state:base_output_dir(State),
FileName = archive_name(Release),
filename:join(Dir, FileName).

archive_dir(State) ->
case get({rebar3_erllambda_rlx_zip_prv, archive_dir}) of
undefined ->
rlx_state:base_output_dir(State);
Dir ->
Dir
end.

archive_name(Release) ->
Name = atom_to_list(rlx_release:name(Release)),
Vsn = rlx_release:vsn(Release),
Expand Down
5 changes: 0 additions & 5 deletions src/rebar3_erllambda_zip.erl
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ do( State ) ->
rebar_api:info( "generating erllambda zip package", [] ),
State1 = rebar3_erllambda:add_property(
State, relx, add_providers, rebar3_erllambda_rlx_zip_prv),
%% Internal tooling expects artifacts in this specific location, to be fixed
set_archive_dir(State1),
rebar_relx:do(rebar3_erllambda_rlx_prv, "erllambda_zip", ?PROVIDER, State1).

%%%---------------------------------------------------------------------------
Expand All @@ -70,6 +68,3 @@ format_error( Error ) ->
%%============================================================================
%% Internal Functions
%%============================================================================
set_archive_dir(State) ->
BaseDir = rebar_dir:base_dir(State),
put({rebar3_erllambda_rlx_zip_prv, archive_dir}, BaseDir).

0 comments on commit 4ce8c49

Please sign in to comment.