diff options
author | Jared Morrow <jared@basho.com> | 2014-01-14 12:48:48 -0800 |
---|---|---|
committer | Jared Morrow <jared@basho.com> | 2014-01-14 12:48:48 -0800 |
commit | d75af5266df6e4295f4dc7fd9a1dd16456ef8638 (patch) | |
tree | 710e6fe4277414f6d829fbcc58c42534aac47241 | |
parent | df42410cf21a37e0c48e741ffa37db9efc576309 (diff) | |
parent | 2246d1b69efe8ced57d7bcadac9069c3701c2cb1 (diff) |
Merge pull request #183 from EchoTeam/generate-upgrade-and-target-dir
generate-upgrade can now take target_dir argument
-rw-r--r-- | src/rebar_upgrade.erl | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/rebar_upgrade.erl b/src/rebar_upgrade.erl index 5814e51..3a38a08 100644 --- a/src/rebar_upgrade.erl +++ b/src/rebar_upgrade.erl @@ -87,7 +87,8 @@ info(help, 'generate-upgrade') -> ?CONSOLE("Build an upgrade package.~n" "~n" "Valid command line options:~n" - " previous_release=path~n", + " previous_release=path~n" + " target_dir=target_dir (optional)~n", []). run_checks(Config, OldVerPath, ReltoolConfig) -> @@ -97,10 +98,7 @@ run_checks(Config, OldVerPath, ReltoolConfig) -> {Name, Ver} = rebar_rel_utils:get_reltool_release_info(ReltoolConfig), - NewVerPath = - filename:join( - [rebar_rel_utils:get_target_parent_dir(Config, ReltoolConfig), - Name]), + NewVerPath = rebar_rel_utils:get_target_dir(Config, ReltoolConfig), true = rebar_utils:prop_check(filelib:is_dir(NewVerPath), "Release directory doesn't exist (~p)~n", [NewVerPath]), |