You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by va...@apache.org on 2021/08/27 21:06:54 UTC
[couchdb] branch 3.x updated: Merge keys from rebar.config
This is an automated email from the ASF dual-hosted git repository.
vatamane pushed a commit to branch 3.x
in repository https://gitbox.apache.org/repos/asf/couchdb.git
The following commit(s) were added to refs/heads/3.x by this push:
new 9716f88 Merge keys from rebar.config
9716f88 is described below
commit 9716f88ef164941cc165e3612c4ad7337de70f43
Author: ncshaw <nc...@ibm.com>
AuthorDate: Fri Aug 27 15:58:25 2021 -0400
Merge keys from rebar.config
---
.gitignore | 1 +
rebar.config.script | 9 +++++++--
src/couch/.gitignore | 2 ++
src/couch/rebar.config.script | 7 ++++++-
4 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/.gitignore b/.gitignore
index d9f0d50..3d49a33 100644
--- a/.gitignore
+++ b/.gitignore
@@ -32,6 +32,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 52b9d99..cbf87e7 100644
--- a/rebar.config.script
+++ b/rebar.config.script
@@ -215,6 +215,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 e1fa653..861974a 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 b03d70d..d1b4dbc 100644
--- a/src/couch/rebar.config.script
+++ b/src/couch/rebar.config.script
@@ -236,5 +236,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).