diff options
author | iilyak <iilyak@users.noreply.github.com> | 2020-04-16 05:16:11 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-16 05:16:11 -0700 |
commit | a527ad1a8da059e6ff202fb976a4e70da216dc93 (patch) | |
tree | 4966a8f9b297a4318ccc36a89937e6cbfa345bb4 | |
parent | 4098c12abeffdf89988663ec9d17544f6509256f (diff) | |
parent | 4e2f18c03e478855e927d9d0ae7bd757427c2edd (diff) | |
download | couchdb-a527ad1a8da059e6ff202fb976a4e70da216dc93.tar.gz |
Merge pull request #2783 from cloudant/merge-rebar-config
Merge keys from rebar.config
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | rebar.config.script | 9 | ||||
-rw-r--r-- | src/couch/.gitignore | 2 | ||||
-rw-r--r-- | src/couch/rebar.config.script | 7 |
4 files changed, 16 insertions, 3 deletions
diff --git a/.gitignore b/.gitignore index e2d3eff6f..5c4255245 100644 --- a/.gitignore +++ b/.gitignore @@ -28,6 +28,7 @@ ebin/ erl_crash.dump erln8.config install.mk +rebar.config rel/*.config rel/couchdb rel/dev* diff --git a/rebar.config.script b/rebar.config.script index 6f9f65c73..b3ea2c933 100644 --- a/rebar.config.script +++ b/rebar.config.script @@ -223,6 +223,11 @@ AddConfig = [ {post_hooks, [{compile, "escript support/build_js.escript"}]} ], -C = lists:foldl(fun({K, V}, CfgAcc) -> - lists:keystore(K, 1, CfgAcc, {K, V}) +lists:foldl(fun({K, V}, CfgAcc) -> + case lists:keyfind(K, 1, CfgAcc) of + {K, Existent} when is_list(Existent) andalso is_list(V) -> + lists:keystore(K, 1, CfgAcc, {K, Existent ++ V}); + false -> + lists:keystore(K, 1, CfgAcc, {K, V}) + end end, CONFIG, AddConfig). diff --git a/src/couch/.gitignore b/src/couch/.gitignore index e1fa65333..861974adb 100644 --- a/src/couch/.gitignore +++ b/src/couch/.gitignore @@ -19,3 +19,5 @@ test/engines/log/ .rebar/ .eunit + +rebar.config diff --git a/src/couch/rebar.config.script b/src/couch/rebar.config.script index 91e24d99e..80e6bd12e 100644 --- a/src/couch/rebar.config.script +++ b/src/couch/rebar.config.script @@ -229,5 +229,10 @@ AddConfig = [ ]. lists:foldl(fun({K, V}, CfgAcc) -> - lists:keystore(K, 1, CfgAcc, {K, V}) + case lists:keyfind(K, 1, CfgAcc) of + {K, Existent} when is_list(Existent) andalso is_list(V) -> + lists:keystore(K, 1, CfgAcc, {K, Existent ++ V}); + false -> + lists:keystore(K, 1, CfgAcc, {K, V}) + end end, CONFIG, AddConfig). |