You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ro...@apache.org on 2024/07/26 17:16:49 UTC
(couchdb) 01/01: dev(chore): Use atom for config key `with_spidermonkey`
This is an automated email from the ASF dual-hosted git repository.
ronny pushed a commit to branch align-config.erl
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit 67b47a60c630e6d239bb361d568b38ac3c54ec30
Author: Ronny Berndt <ro...@apache.org>
AuthorDate: Fri Jul 26 19:13:40 2024 +0200
dev(chore): Use atom for config key `with_spidermonkey`
---
configure | 4 ++--
configure.ps1 | 4 ++--
src/couch/rebar.config.script | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/configure b/configure
index 977231218..18002b1b7 100755
--- a/configure
+++ b/configure
@@ -387,7 +387,7 @@ cat > rel/couchdb.config << EOF
{user, "$COUCHDB_USER"}.
{js_engine, "$JS_ENGINE"}.
{spidermonkey_version, "$SM_VSN"}.
-{with_spidermonkey, "$WITH_SPIDERMONKEY"}.
+{with_spidermonkey, $WITH_SPIDERMONKEY}.
{node_name, "-name couchdb@127.0.0.1"}.
{cluster_port, 5984}.
{backend_port, 5986}.
@@ -427,7 +427,7 @@ cat > $rootdir/config.erl << EOF
{erlang_md5, $ERLANG_MD5}.
{js_engine, "$JS_ENGINE"}.
{spidermonkey_version, "$SM_VSN"}.
-{with_spidermonkey, "$WITH_SPIDERMONKEY"}.
+{with_spidermonkey, $WITH_SPIDERMONKEY}.
EOF
install_local_rebar() {
diff --git a/configure.ps1 b/configure.ps1
index 7c1bbe825..50c226230 100644
--- a/configure.ps1
+++ b/configure.ps1
@@ -190,7 +190,7 @@ $CouchDBConfig = @"
{user, "$CouchDBUser"}.
{js_engine, "$JSEngine"}.
{spidermonkey_version, "$SpiderMonkeyVersion"}.
-{with_spidermonkey, "$WithSpiderMonkey"}.
+{with_spidermonkey, $WithSpiderMonkey}.
{node_name, "-name couchdb@127.0.0.1"}.
{cluster_port, 5984}.
{backend_port, 5986}.
@@ -248,7 +248,7 @@ $ConfigERL = @"
{erlang_md5, $ErlangMD5}.
{js_engine, "$JSEngine"}.
{spidermonkey_version, "$SpiderMonkeyVersion"}.
-{with_spidermonkey, "$WithSpiderMonkey"}.
+{with_spidermonkey, $WithSpiderMonkey}.
"@
$ConfigERL | Out-File "$rootdir\config.erl" -encoding ascii
diff --git a/src/couch/rebar.config.script b/src/couch/rebar.config.script
index 8030d51f0..a28c95509 100644
--- a/src/couch/rebar.config.script
+++ b/src/couch/rebar.config.script
@@ -69,10 +69,10 @@ JsEngine = case lists:keyfind(js_engine, 1, CouchConfig) of
end.
WithSpidermonkey = case {lists:keyfind(with_spidermonkey, 1, CouchConfig), JsEngine} of
- {{_, "false"}, "spidermonkey"} ->
+ {{_, false}, "spidermonkey"} ->
io:format(standard_error, "Spidermonkey is disabled, select another default js_enigine ~n", []),
erlang:halt(1);
- {{_, "false"}, _} ->
+ {{_, false}, _} ->
false;
{_, _} ->
true