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


##########
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.
   
   I'm happy to change it if you can show me an example of how your script does 
it.
   
   Also, I tried to find a nice way to get `curl` to download an entire 
directory, but most things I read said that `wget` was the better tool for the 
job. Open to suggestions for the equivalent command though.



-- 
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