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/27 13:09:39 UTC

(couchdb) 01/01: chore(dev): Replace 0/1 to false/true for config keys

This is an automated email from the ASF dual-hosted git repository.

ronny pushed a commit to branch jenkins-align-dev-kvs-2
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 6c7ea7eba34fb8fa650b2968d487a0fe20ad977b
Author: Ronny Berndt <ro...@apache.org>
AuthorDate: Sat Jul 27 15:06:14 2024 +0200

    chore(dev): Replace 0/1 to false/true for config keys
    
    Replacing the config values 0/1 to false/true for the following keys:
    
    WITH_FAUXTON, WITH_DOCS, WITH_CLOUSEAU, SKIP_DEPS
---
 Makefile      | 10 +++++-----
 Makefile.win  | 10 +++++-----
 configure     | 28 ++++++++++++++--------------
 configure.ps1 |  4 ++--
 4 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/Makefile b/Makefile
index b68e83c01..9a969139e 100644
--- a/Makefile
+++ b/Makefile
@@ -265,7 +265,7 @@ elixir: elixir-init devclean
 
 ifneq ($(CLOUSEAU_DIR),)
 _WITH_CLOUSEAU="--with-clouseau --clouseau-dir=$(CLOUSEAU_DIR)"
-else ifeq ($(with_clouseau), 1)
+else ifeq ($(with_clouseau), true)
 _WITH_CLOUSEAU="--with-clouseau"
 endif
 
@@ -416,12 +416,12 @@ ifeq ($(with_spidermonkey), true)
 	@cp share/server/main-coffee.js rel/couchdb/share/server/main-coffee.js
 endif
 
-ifeq ($(with_fauxton), 1)
+ifeq ($(with_fauxton), true)
 	@mkdir -p rel/couchdb/share/
 	@cp -R share/www rel/couchdb/share/
 endif
 
-ifeq ($(with_docs), 1)
+ifeq ($(with_docs), true)
 ifeq ($(IN_RELEASE), true)
 	@mkdir -p rel/couchdb/share/www/docs/
 	@mkdir -p rel/couchdb/share/docs/
@@ -522,13 +522,13 @@ config.erl:
 
 
 src/docs/build:
-ifeq ($(with_docs), 1)
+ifeq ($(with_docs), true)
 	@cd src/docs; ./setup.sh ; $(MAKE)
 endif
 
 
 share/www:
-ifeq ($(with_fauxton), 1)
+ifeq ($(with_fauxton), true)
 	@echo "Building Fauxton"
 	@cd src/fauxton && npm install && ./node_modules/grunt-cli/bin/grunt couchdb
 endif
diff --git a/Makefile.win b/Makefile.win
index d11f56f69..bbd2239f2 100644
--- a/Makefile.win
+++ b/Makefile.win
@@ -246,7 +246,7 @@ elixir: elixir-init devclean
 
 ifneq ($(CLOUSEAU_DIR),)
 _WITH_CLOUSEAU="--with-clouseau --clouseau-dir=$(CLOUSEAU_DIR)"
-else ifeq ($(with_clouseau), 1)
+else ifeq ($(with_clouseau), true)
 _WITH_CLOUSEAU="--with-clouseau"
 endif
 
@@ -375,12 +375,12 @@ ifeq ($(with_spidermonkey), true)
 	@copy share\server\main-coffee.js rel\couchdb\share\server\main-coffee.js
 endif
 
-ifeq ($(with_fauxton), 1)
+ifeq ($(with_fauxton), true)
 	-@mkdir rel\couchdb\share
 	-@xcopy share\www rel\couchdb\share\www /E/I
 endif
 
-ifeq ($(with_docs), 1)
+ifeq ($(with_docs), true)
 	-@mkdir rel\couchdb\share\www\docs
 	-@mkdir rel\couchdb\share\docs
 ifeq ($(IN_RELEASE), true)
@@ -485,13 +485,13 @@ config.erl:
 
 src\docs\build:
 	@echo 'Building docs...'
-ifeq ($(with_docs), 1)
+ifeq ($(with_docs), true)
 	@cd src\docs && setup.bat && make.bat html && make.bat man
 endif
 
 
 share\www:
-ifeq ($(with_fauxton), 1)
+ifeq ($(with_fauxton), true)
 	@echo 'Building Fauxton'
 	@cd src\fauxton && npm install && .\node_modules\.bin\grunt couchdb
 endif
diff --git a/configure b/configure
index 18002b1b7..b066c204f 100755
--- a/configure
+++ b/configure
@@ -26,12 +26,12 @@ ERLFMT_VERSION="v1.3.0"
 
 # TEST=0
 WITH_PROPER="true"
-WITH_FAUXTON=1
-WITH_DOCS=1
+WITH_FAUXTON="true"
+WITH_DOCS="true"
 WITH_NOUVEAU="false"
-WITH_CLOUSEAU=0
+WITH_CLOUSEAU="false"
 ERLANG_MD5="false"
-SKIP_DEPS=0
+SKIP_DEPS="false"
 WITH_SPIDERMONKEY="true"
 
 run_erlang() {
@@ -94,13 +94,13 @@ parse_opts() {
                 ;;
 
             --disable-fauxton)
-                WITH_FAUXTON=0
+                WITH_FAUXTON="false"
                 shift
                 continue
                 ;;
 
             --disable-docs)
-                WITH_DOCS=0
+                WITH_DOCS="false"
                 shift
                 continue
                 ;;
@@ -116,7 +116,7 @@ parse_opts() {
 		            echo "Warning: Clouseau is not working with OTP 26 or later at the moment, therefore it is not configured.  Continue in 5 seconds..."
 		            sleep 5
 		        else
-		            WITH_CLOUSEAU=1
+		            WITH_CLOUSEAU="true"
 		        fi
 		        shift
 		        continue
@@ -129,22 +129,22 @@ parse_opts() {
                 ;;
 
             --dev)
-                WITH_DOCS=0
-                WITH_FAUXTON=0
+                WITH_DOCS="false"
+                WITH_FAUXTON="false"
                 shift
                 continue
                 ;;
 
             --dev-with-nouveau)
-                WITH_DOCS=0
-                WITH_FAUXTON=0
+                WITH_DOCS="false"
+                WITH_FAUXTON="false"
                 WITH_NOUVEAU="true"
                 shift
                 continue
                 ;;
 
             --skip-deps)
-                SKIP_DEPS=1
+                SKIP_DEPS="true"
                 shift
                 continue
                 ;;
@@ -533,12 +533,12 @@ if [ -z "${ERLFMT}" ]; then
     ERLFMT=${rootdir}/bin/erlfmt
 fi
 
-if [ $WITH_CLOUSEAU -ne 0 ]; then
+if [ "$WITH_CLOUSEAU" = "true" ]; then
     install_local_clouseau
 fi
 
 # only update dependencies, when we are not in a release tarball
-if [ -d .git  -a $SKIP_DEPS -ne 1 ]; then
+if [ -d .git ] && [ "$SKIP_DEPS" = "false" ]; then
     echo "==> updating dependencies"
     ${REBAR} get-deps update-deps
 fi
diff --git a/configure.ps1 b/configure.ps1
index 50c226230..58ccb2afd 100644
--- a/configure.ps1
+++ b/configure.ps1
@@ -143,8 +143,8 @@ If ($LASTEXITCODE -ne 0) {
 $PackageAuthorName="The Apache Software Foundation"
 $InstallDir="$LibDir\couchdb"
 $LogFile="$LogDir\couch.log"
-$BuildFauxton = [int](-not $DisableFauxton)
-$BuildDocs = [int](-not $DisableDocs)
+$BuildFauxton = (-not $DisableFauxton).ToString().ToLower()
+$BuildDocs = (-not $DisableDocs).ToString().ToLower()
 $Hostname = [System.Net.Dns]::GetHostEntry([string]"localhost").HostName
 $WithProper = (-not $DisableProper).ToString().ToLower()
 $ErlangMD5 = ($EnableErlangMD5).ToString().ToLower()