Skip to content

Commit

Permalink
Merge branch 'release/2.4.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
lrascao committed Jan 30, 2019
2 parents dbd74c2 + b2dc897 commit 8175043
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ This project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased][unreleased]

## [2.4.4] - 30-01-2019
### Added
### Changed
### Fixed
- [(fix) Support 'relname' - handle relname arg](https://github.com/lrascao/rebar3_appup_utils/pull/59)

## [2.4.3] - 30-01-2019
### Added
### Changed
Expand Down
2 changes: 1 addition & 1 deletion src/rebar3_appup_plugin.app.src
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
%% -------------------------------------------------------------------
{application, rebar3_appup_plugin, [
{description, "A rebar3 plugin for handling .appup files"},
{vsn, "2.4.3"},
{vsn, "2.4.4"},
{registered, []},
{applications,
[
Expand Down
20 changes: 15 additions & 5 deletions src/rebar3_appup_utils.erl
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,22 @@
vsn/1]).

-spec get_release_name(State) -> Res when
State :: rebar_state:t(),
Res :: string().
State :: rebar_state:t(),
Res :: string().
get_release_name(State) ->
RelxConfig = rebar_state:get(State, relx, []),
{release, {Name0, _Ver}, _} = lists:keyfind(release, 1, RelxConfig),
atom_to_list(Name0).
{Opts, _} = rebar_state:command_parsed_args(State),
case proplists:get_value(relname, Opts, undefined) of
undefined ->
RelxConfig = rebar_state:get(State, relx, []),
case lists:keyfind(release, 1, RelxConfig) of
{release, {Name0, _Ver}, _} ->
atom_to_list(Name0);
{release, {Name0, _Ver}, _, _} ->
atom_to_list(Name0)
end;
Name ->
Name
end.

%% Helper function for checking values and aborting when needed
%% @spec prop_check(boolean(),_,_) -> any().
Expand Down

0 comments on commit 8175043

Please sign in to comment.