Skip to content

Commit

Permalink
Workaround for dep-vsn-check in travis-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
gilbertwong96 authored and Gilbert committed Apr 25, 2019
1 parent 281fb2d commit 3b0f232
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
2 changes: 1 addition & 1 deletion rebar.config
Expand Up @@ -11,7 +11,7 @@
{cuttlefish, "v2.2.1"}]}.

{github_emqx_projects,
[emqx_ct_helpers]}.
[{emqx_ct_helpers, "v1.0"}]}.

{edoc_opts, [{preprocess, true}]}.
{erl_opts, [warn_unused_vars,
Expand Down
10 changes: 1 addition & 9 deletions rebar.config.script
Expand Up @@ -16,13 +16,6 @@ CONFIG1 = case os:getenv("TRAVIS") of
CONFIG
end,

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,

FindDeps = fun(DepsType, Config) ->
case lists:keyfind(DepsType, 1, Config) of
{_, RawDeps} -> RawDeps;
Expand All @@ -43,8 +36,7 @@ RealName = fun TransName([$_ | Tail], Result) ->

NewLibDeps = [{LibName, {git, UrlPrefix ++ atom_to_list(LibName), {branch, Branch}}}
|| {LibName, Branch} <- LibDeps],
NewProjDeps = [{Name, {git, UrlPrefix ++ RealName(atom_to_list(Name), []), {branch, BRANCH}}}
|| Name <- ProjDeps],
NewProjDeps = [{ProjName, {git, UrlPrefix ++ RealName(atom_to_list(ProjName), []), {branch, Branch}}} || {ProjName, Branch} <- ProjDeps],

NewDeps = Deps ++ NewLibDeps ++ NewProjDeps,
CONFIG2 = lists:keystore(deps, 1, CONFIG1, {deps, NewDeps}),
Expand Down

0 comments on commit 3b0f232

Please sign in to comment.