您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

37 行
1.2 KiB

  1. % This file is part of Jiffy released under the MIT license.
  2. % See the LICENSE file for more information.
  3. % Only include PropEr as a dependency when the JIFFY_DEV
  4. % environment variable is defined. This allows downstream
  5. % applications to avoid requiring PropEr.
  6. %
  7. % This script is based on the example provided with Rebar.
  8. ErlOpts = [{d, 'JIFFY_DEV'}],
  9. Proper = [
  10. {proper, ".*", {git, "git://github.com/manopapad/proper.git", "master"}}
  11. ],
  12. ConfigPath = filename:dirname(SCRIPT),
  13. DevMarker = filename:join([ConfigPath, ".jiffy.dev"]),
  14. case filelib:is_file(DevMarker) orelse os:getenv("TRAVIS") == "true" of
  15. true ->
  16. % Don't override existing dependencies
  17. Config0 = case lists:keyfind(deps, 1, CONFIG) of
  18. false ->
  19. CONFIG ++ [{deps, Proper}];
  20. {deps, DepsList} ->
  21. lists:keyreplace(deps, 1, CONFIG, {deps, DepsList ++ Proper})
  22. end,
  23. Config1 = case lists:keyfind(erl_opts, 1, Config0) of
  24. false ->
  25. Config0 ++ [{erl_opts, ErlOpts}];
  26. {erl_opts, Opts} ->
  27. NewOpts = {erl_opts, Opts ++ ErlOpts},
  28. lists:keyreplace(erl_opts, 1, Config0, NewOpts)
  29. end;
  30. false ->
  31. CONFIG
  32. end.