activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rob...@apache.org
Subject activemq git commit: NO-JIRA: tweak script to default to a version-named dir, allow specifying alternative, and exit if it already exists
Date Thu, 21 Sep 2017 15:18:16 GMT
Repository: activemq
Updated Branches:
  refs/heads/master 6e33507bf -> c513bd7ba


NO-JIRA: tweak script to default to a version-named dir, allow specifying alternative, and
exit if it already exists


Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/c513bd7b
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/c513bd7b
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/c513bd7b

Branch: refs/heads/master
Commit: c513bd7ba86a250edd205ea52df31d80318c7fd6
Parents: 6e33507
Author: Robbie Gemmell <robbie@apache.org>
Authored: Thu Sep 21 16:16:31 2017 +0100
Committer: Robbie Gemmell <robbie@apache.org>
Committed: Thu Sep 21 16:16:31 2017 +0100

----------------------------------------------------------------------
 etc/scripts/prepare-release.sh | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/c513bd7b/etc/scripts/prepare-release.sh
----------------------------------------------------------------------
diff --git a/etc/scripts/prepare-release.sh b/etc/scripts/prepare-release.sh
old mode 100644
new mode 100755
index 2378045..bd3c3b3
--- a/etc/scripts/prepare-release.sh
+++ b/etc/scripts/prepare-release.sh
@@ -26,7 +26,7 @@ error () {
    echo ""
    echo "$@"
    echo ""
-   echo "Usage: ./prepare-release.sh repo-url version"
+   echo "Usage: ./prepare-release.sh repo-url version [target-dir (defaults to version, must
not exist)]"
    echo ""
    echo "example:"
    echo "./prepare-release.sh https://repo1.maven.org/maven2 5.15.0"
@@ -62,15 +62,16 @@ doDownload () {
   sha512sum $theFile > $theFile.sha512
 }
 
-if [ "$#" != 2 ]; then
+if [ "$#" -lt 2 ]; then
   error "Cannot match arguments"
 fi
 
 release=$2
-target="activemq-$2"
+target=${3-$2}
+echo "Target Directory: $target"
 
 if [ -d $target ]; then
-  cd $target
+  error "Directory $target already exists, stopping"
 else
   echo "Directory $target does not exist, creating"
   mkdir $target
@@ -85,7 +86,7 @@ doDownload $binRepoURL apache-activemq-$release-bin.zip
 doDownload $binRepoURL apache-activemq-$release-bin.tar.gz
 
 echo ""
-echo "--- Download Complate for Release $2 Artifacts are in $target---"
+echo "--- Download Complete for Release $2 Artifacts are in $target---"
 echo ""
 echo "Validating all MD5 checksum files"
 md5sum -c *.md5


Mime
View raw message