Skip to content

Commit

Permalink
Support branch transition for release
Browse files Browse the repository at this point in the history
  • Loading branch information
gilbertwong96 committed Jun 10, 2019
1 parent 2fdaf54 commit ab84b66
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions rebar.config.script
Expand Up @@ -10,10 +10,17 @@ CONFIG1 = case os:getenv("TRAVIS") of

CUR_BRANCH = os:cmd("git branch | grep -e '^*' | cut -d' ' -f 2") -- "\n",

BRANCH = case lists:member(CUR_BRANCH, ["master", "develop"]) of
true -> CUR_BRANCH;
false -> "develop"
end,
MATCH_BRANCH = fun (BranchName) when BranchName =:= "master";
BranchName =:= "develop" ->
BranchName;
(BranchName) ->
case string:prefix(BranchName, "release") of
nomatch -> "develop";
_Match -> BranchName
end
end,

BRANCH = MATCH_BRANCH(CUR_BRANCH),

DEPS = case lists:keyfind(deps, 1, CONFIG1) of
{_, Deps} -> Deps;
Expand Down

0 comments on commit ab84b66

Please sign in to comment.