janl commented on code in PR #6:
URL: https://github.com/apache/couchdb-admin/pull/6#discussion_r1807252463


##########
release/test_candidate.sh:
##########
@@ -0,0 +1,78 @@
+#!/bin/sh -ex
+
+# https://cwiki.apache.org/confluence/display/COUCHDB/Testing+a+Source+Release
+
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations under
+# the License.
+
+if test -n "$1"; then
+    version=$1
+else
+    echo "error: no version"
+    exit
+fi
+
+if test -n "$2"; then
+    candidate=$2
+else
+    echo "error: no candidate number"
+    exit
+fi
+
+log () {
+    printf "\033[1;31m$1\033[0m\n"
+}
+
+cd `dirname $0`
+
+basename=`basename $0`
+
+if test -n "$3"; then
+    tmp_dir=$3
+else
+    tmp_dir=`mktemp -d /tmp/$basename.XXXXXX` || exit 1
+    log "Creating temporary directory $tmp_dir"
+fi
+
+config_opts=${CONFIG_OPTS:-"--js-engine=quickjs --with-clouseau"}
+
+artifact_url=https://dist.apache.org/repos/dist/dev/couchdb/source/$version/rc$candidate/
+
+mkdir -p $tmp_dir/dist
+cd $tmp_dir/dist
+
+erl -eval 'erlang:display(erlang:system_info(otp_release)), halt().' -noshell
+elixir --version
+python --version
+java -version
+
+wget --no-parent --no-directories -r $artifact_url
+
+gpg --verify apache-couchdb-*.tar.gz.asc
+
+sha256sum --check apache-couchdb-*.tar.gz.sha256
+
+tar -xvzf apache-couchdb-*.tar.gz
+
+cd apache-couchdb-$version
+
+./configure $config_opts
+
+exit 0
+
+make check
+
+make release
+
+echo 'adm = pass' >>  rel/couchdb/etc/local.ini
+
+./rel/couchdb/bin/couchdb && open http://127.0.0.1:5984/_utils/

Review Comment:
   final bit here could be fetching the lastest git-ish for the release line 
branch from GitHub and compare it against the one reported on `GET /`



##########
release/test_candidate.sh:
##########
@@ -0,0 +1,78 @@
+#!/bin/sh -ex
+
+# https://cwiki.apache.org/confluence/display/COUCHDB/Testing+a+Source+Release
+
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations under
+# the License.
+
+if test -n "$1"; then
+    version=$1
+else
+    echo "error: no version"
+    exit
+fi
+
+if test -n "$2"; then
+    candidate=$2
+else
+    echo "error: no candidate number"
+    exit
+fi
+
+log () {
+    printf "\033[1;31m$1\033[0m\n"
+}
+
+cd `dirname $0`
+
+basename=`basename $0`
+
+if test -n "$3"; then
+    tmp_dir=$3
+else
+    tmp_dir=`mktemp -d /tmp/$basename.XXXXXX` || exit 1
+    log "Creating temporary directory $tmp_dir"
+fi
+
+config_opts=${CONFIG_OPTS:-"--js-engine=quickjs --with-clouseau"}
+
+artifact_url=https://dist.apache.org/repos/dist/dev/couchdb/source/$version/rc$candidate/
+
+mkdir -p $tmp_dir/dist
+cd $tmp_dir/dist
+
+erl -eval 'erlang:display(erlang:system_info(otp_release)), halt().' -noshell
+elixir --version
+python --version
+java -version
+
+wget --no-parent --no-directories -r $artifact_url

Review Comment:
   my version of this also pulls down the hashes and prints them next to the 
generated ones, so you can spot any difference right away.
   
   Also slight preference to use `curl` as `wget` is non-default on BSDs and 
macOS.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to