Author: tabish
Date: Tue May  4 22:42:40 2021
New Revision: 47542

Log:
Add a staging dir and script for ProtonJ2 release

Added:
    dev/qpid/protonj2/
    dev/qpid/protonj2/prepare-release.sh

Added: dev/qpid/protonj2/prepare-release.sh
==============================================================================
--- dev/qpid/protonj2/prepare-release.sh (added)
+++ dev/qpid/protonj2/prepare-release.sh Tue May  4 22:42:40 2021
@@ -0,0 +1,95 @@
+#!/bin/sh
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you 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.
+
+# Setting the script to fail if anything goes wrong
+set -e
+
+#This is a script to help with the release process
+
+
+error () {
+   echo ""
+   echo "$@"
+   echo ""
+   echo "Usage: ./prepare-release.sh repo-url version [target-dir (defaults to 
<version>-rc1, must not exist)]"
+   echo ""
+   echo "example:"
+   echo "./prepare-release.sh 
https://repository.apache.org/content/repositories/orgapacheqpid-<staging-id> 
0.27.0"
+   echo ""
+   exit 64
+}
+
+doDownload () {
+
+  repoPath="$1"
+  theFile="$2"
+  completeURL="$repoPath/$theFile"
+
+  echo
+  echo $theFile
+
+  echo "Downloading $completeURL"
+  curl $completeURL > $theFile
+
+  echo "Downloading $theFile.asc"
+  curl $completeURL.asc > $theFile.asc
+
+  echo "Verifying signature $theFile.asc"
+  gpg --verify $theFile.asc
+
+  echo "Downloading $theFile.md5 for verification check only"
+  curl $completeURL.md5 > $theFile.md5
+  echo "Validating MD5 checksum file"
+  echo "  $theFile" >> $theFile.md5
+  md5sum -c $theFile.md5
+  echo "Removing MD5 checksum, we no longer distribute it"
+  rm $theFile.md5
+
+  echo "Generating SHA512 checksum file $theFile.sha512"
+  sha512sum $theFile > $theFile.sha512
+}
+
+if [ "$#" -lt 2 ]; then
+  error "Cannot match arguments"
+fi
+
+release=$2
+defaultTarget=$2-rc1
+target=${3-$defaultTarget}
+echo "Target Directory: $target"
+
+if [ -d $target ]; then
+  error "Directory $target already exists, stopping"
+else
+  echo "Directory $target does not exist, creating"
+  mkdir $target
+  cd $target
+fi
+
+repoURL="$1/org/apache/qpid/apache-qpid-protonj2/$2"
+
+doDownload $repoURL apache-qpid-protonj2-$release-bin.tar.gz
+doDownload $repoURL apache-qpid-protonj2-$release-src.tar.gz 
+
+echo ""
+echo "--- Download Complete for Release $2. Artifacts are in $target ---"
+echo ""
+
+echo "Validating all SHA512 checksum files"
+sha512sum -c *.sha512
+



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to