25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
653 B

  1. ExistingErlOpts = proplists:get_value(erl_opts, CONFIG, []),
  2. CONFIG1 = case code:which(persistent_term) of
  3. preloaded ->
  4. lists:keyreplace(erl_opts, 1, CONFIG, {erl_opts, [{d, 'HAVE_PERSISTENT_TERM'}|ExistingErlOpts]});
  5. non_existing ->
  6. CONFIG
  7. end,
  8. case erlang:function_exported(rebar3, main, 1) of
  9. true -> % rebar3
  10. CONFIG1;
  11. false -> % rebar 2.x or older
  12. %% Rebuild deps, possibly including those that have been moved to
  13. %% profiles
  14. [{deps, [
  15. {goldrush, ".*", {git, "https://github.com/DeadZen/goldrush.git", {tag, "0.1.9"}}}
  16. ]} | lists:keydelete(deps, 1, CONFIG1)]
  17. end.