You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

92 line
3.9 KiB

5 年之前
7 年之前
7 年之前
7 年之前
  1. %% -*- mode: erlang;erlang-indent-level: 4;indent-tabs-mode: nil -*-
  2. %% ex: ts=4 sw=4 ft=erlang et
  3. {deps, [{erlware_commons, "1.3.1"},
  4. {ssl_verify_fun, "1.1.5"},
  5. {certifi, "2.5.1"},
  6. {parse_trans, "3.3.0"}, % force otp-21 compat
  7. {providers, "1.8.1"},
  8. {getopt, "1.0.1"},
  9. {bbmustache, "1.8.0"},
  10. %% {relx, "3.33.0"},
  11. {relx, {git, "https://github.com/erlware/relx.git", {tag, "v4.0.0-rc1"}}},
  12. {cf, "0.2.2"},
  13. {cth_readable, "1.4.8"},
  14. {eunit_formatters, "0.5.0"}]}.
  15. {post_hooks, [{"(linux|darwin|solaris|freebsd|netbsd|openbsd)",
  16. escriptize,
  17. "cp \"$REBAR_BUILD_DIR/bin/rebar3\" ./rebar3"},
  18. {"win32",
  19. escriptize,
  20. "robocopy \"%REBAR_BUILD_DIR%/bin/\" ./ rebar3* "
  21. "/njs /njh /nfl /ndl & exit /b 0"} % silence things
  22. ]}.
  23. {escript_name, rebar3}.
  24. {escript_emu_args, "%%! +sbtu +A1\n"}.
  25. %% escript_incl_extra is for internal rebar-private use only.
  26. %% Do not use outside rebar. Config interface is not stable.
  27. {escript_incl_extra, [{"relx/priv/templates/*", "_build/default/lib/"},
  28. {"rebar/priv/templates/*", "_build/default/lib/"}]}.
  29. {overrides, [{add, relx, [{erl_opts, [{d, 'RLX_LOG', rebar_log}]}]}]}.
  30. {erl_opts, [{platform_define, "^(19|2)", rand_only},
  31. {platform_define, "^18", no_maps_update_with},
  32. {platform_define, "^2", unicode_str},
  33. {platform_define, "^(2[1-9])|(20\\\\.3)", filelib_find_source},
  34. {platform_define, "^(R|1|20)", fun_stacktrace},
  35. warnings_as_errors
  36. ]}.
  37. {edoc_opts, [preprocess]}.
  38. %% Use OTP 18+ when dialyzing rebar3
  39. {dialyzer, [
  40. {warnings, [unknown]},
  41. {exclude_mods, [rebar_prv_alias]}
  42. ]}.
  43. %% Profiles
  44. {profiles, [{test, [
  45. {deps, [{meck, "0.8.13"}]},
  46. {erl_opts, [debug_info, nowarn_export_all]}
  47. ]
  48. },
  49. {systest, [
  50. {erl_opts, [debug_info, nowarn_export_all]},
  51. {ct_opts, [{dir, "systest"}]}
  52. ]},
  53. {bootstrap, []},
  54. {prod, [
  55. {escript_incl_extra, [
  56. {"relx/priv/templates/*", "_build/prod/lib/"},
  57. {"rebar/priv/templates/*", "_build/prod/lib/"}
  58. ]},
  59. {erl_opts, [no_debug_info]},
  60. {overrides, [
  61. {override, erlware_commons, [
  62. {erl_opts, [{platform_define, "^[0-9]+", namespaced_types},
  63. {platform_define, "^R1[4|5]", deprecated_crypto},
  64. {platform_define, "^((1[8|9])|2)", rand_module},
  65. {platform_define, "^2", unicode_str},
  66. {platform_define, "^(R|1|20)", fun_stacktrace},
  67. no_debug_info,
  68. warnings_as_errors]},
  69. {deps, []}, {plugins, []}]},
  70. {add, ssl_verify_hostname, [{erl_opts, [no_debug_info]}]},
  71. {add, certifi, [{erl_opts, [no_debug_info]}]},
  72. {add, cf, [{erl_opts, [no_debug_info]}]},
  73. {add, cth_readable, [{erl_opts, [no_debug_info]}]},
  74. {add, eunit_formatters, [{erl_opts, [no_debug_info]}]},
  75. {override, bbmustache, [
  76. {erl_opts, [no_debug_info, {platform_define, "^[0-9]+", namespaced_types}]},
  77. {deps, []}, {plugins, []}]},
  78. {add, getopt, [{erl_opts, [no_debug_info]}]},
  79. {add, providers, [{erl_opts, [no_debug_info]}]},
  80. {add, relx, [{erl_opts, [no_debug_info]}]}]}
  81. ]}
  82. ]}.