rebar.config.script 944 B

12345678910111213141516171819202122232425
  1. CONFIG0 = case os:getenv("REBAR_GIT_CLONE_OPTIONS") of
  2. "--depth 1" ->
  3. CONFIG;
  4. _ ->
  5. os:putenv("REBAR_GIT_CLONE_OPTIONS", "--depth 1"),
  6. CONFIG
  7. end,
  8. CONFIG1 = case os:getenv("TRAVIS") of
  9. "true" ->
  10. JobId = os:getenv("TRAVIS_JOB_ID"),
  11. [{coveralls_service_job_id, JobId},
  12. {coveralls_coverdata, "_build/test/cover/*.coverdata"},
  13. {coveralls_service_name , "travis-ci"} | CONFIG];
  14. _ ->
  15. CONFIG
  16. end,
  17. {_, Deps} = lists:keyfind(deps, 1, CONFIG1),
  18. {_, OurDeps} = lists:keyfind(github_emqx_deps, 1, CONFIG1),
  19. UrlPrefix = "https://github.com/emqx/",
  20. NewDeps = Deps ++ [{Name, {git, UrlPrefix ++ atom_to_list(Name), {branch, Branch}}} || {Name, Branch} <- OurDeps],
  21. CONFIG2 = lists:keystore(deps, 1, CONFIG1, {deps, NewDeps}),
  22. CONFIG2.