diff options
author | Jan Lehnardt <jan@apache.org> | 2021-03-14 13:06:57 +0100 |
---|---|---|
committer | Jan Lehnardt <jan@apache.org> | 2021-03-17 15:32:49 +0100 |
commit | 509663a83f8bb9a883d67adabc035e47f605dd6a (patch) | |
tree | 2df0eb62bc66503a0c6e93390159da9749878ac0 /rebar.config.script | |
parent | 84eac8a8562c9a7186a60f676d6274ea13d56c9c (diff) | |
download | couchdb-509663a83f8bb9a883d67adabc035e47f605dd6a.tar.gz |
feat: somewhat hacky version detection
Diffstat (limited to 'rebar.config.script')
-rw-r--r-- | rebar.config.script | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/rebar.config.script b/rebar.config.script index 532906c60..463d58cb5 100644 --- a/rebar.config.script +++ b/rebar.config.script @@ -92,6 +92,9 @@ case VerList of _ -> ok end. +[OptMajorVersion|_] = VerList. +OtpMajorVersion20 = case OptMajorVersion of 20 -> "true"; _ -> "false" end. +os:putenv("COUCHDB_OTP_MAJOR_VERSION_20", OtpMajorVersion20). % Set the path to the configuration environment generated % by `./configure`. @@ -200,7 +203,7 @@ AddConfig = [ {deps, lists:map(MakeDep, DepDescs ++ OptionalDeps)}, {sub_dirs, SubDirs}, {lib_dirs, ["src"]}, - {erl_opts, [{i, "../"} | ErlOpts]}, + {erl_opts, [{i, "../"}, {d, 'OTP_MAJOR_VSN_20', os:getenv("COUCHDB_OTP_MAJOR_VERSION_20")}, verbose] ++ ErlOpts}, {eunit_opts, [verbose, {report,{eunit_surefire,[{dir,"."}]}}]}, {plugins, [eunit_plugin]}, {dialyzer, [ |