Repository: incubator-edgent
Updated Branches:
  refs/heads/develop 3f0c67de8 -> 0adfee337


release process cleanup

- add make_checksums.sh
- update stage_release_candidate.sh

Project: http://git-wip-us.apache.org/repos/asf/incubator-edgent/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-edgent/commit/7a2707ac
Tree: http://git-wip-us.apache.org/repos/asf/incubator-edgent/tree/7a2707ac
Diff: http://git-wip-us.apache.org/repos/asf/incubator-edgent/diff/7a2707ac

Branch: refs/heads/develop
Commit: 7a2707ac76601976894aaeb46b0c945a8e650c86
Parents: 3f0c67d
Author: Dale LaBossiere <dlab...@us.ibm.com>
Authored: Mon Jan 15 11:51:30 2018 -0500
Committer: Dale LaBossiere <dlab...@us.ibm.com>
Committed: Mon Jan 15 11:51:30 2018 -0500

----------------------------------------------------------------------
 buildTools/common.sh                  |  2 +-
 buildTools/make_checksums.sh          | 61 ++++++++++++++++++++++++++++++
 buildTools/stage_release_candidate.sh | 31 +++++++++------
 3 files changed, 81 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-edgent/blob/7a2707ac/buildTools/common.sh
----------------------------------------------------------------------
diff --git a/buildTools/common.sh b/buildTools/common.sh
index 8c6ebfb..484d8a3 100755
--- a/buildTools/common.sh
+++ b/buildTools/common.sh
@@ -105,7 +105,7 @@ function getEdgentVer() {  # $1 == "gradle" | "bundle"
     MSG="Unable to identify the version id from ${PROPS}"
   elif [ $1 == "bundle" ]; then
     # Get the X.Y.Z version from a build generated bundle's name
-    BUNDLE=`echo ${BUNDLE_DIR}/*-src.tgz`
+    BUNDLE=`echo ${BUNDLE_DIR}/apache-edgent-*-source-release.tar.gz`
     VER=`echo ${BUNDLE} | grep -o -E '\d+\.\d+\.\d+'`
     MSG="Unable to identify the version id from bundle ${BUNDLE}"
   fi

http://git-wip-us.apache.org/repos/asf/incubator-edgent/blob/7a2707ac/buildTools/make_checksums.sh
----------------------------------------------------------------------
diff --git a/buildTools/make_checksums.sh b/buildTools/make_checksums.sh
new file mode 100755
index 0000000..493c607
--- /dev/null
+++ b/buildTools/make_checksums.sh
@@ -0,0 +1,61 @@
+#!/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.
+##
+################################################################################
+
+set -e
+
+# Generates checksum files for all tar.gz and zip in the current 
+# or specified directory
+
+. `dirname $0`/common.sh
+
+setUsage "`basename $0` [bundle-directory]"
+handleHelp "$@"
+
+BUNDLE_DIR=.
+if [ $# -ge 1 ]
+then
+    BUNDLE_DIR=$1; shift
+fi
+
+noExtraArgs "$@"
+
+[ -d ${BUNDLE_DIR} ] || die "Bundle directory \"${BUNDLE_DIR}\" does not exist"
+
+function makeFileChecksums() {
+    FILE="$1"
+    echo "Generating checksums for $FILE..."
+    [ -f "${FILE}" ] || die "Bundle file \"${FILE}\" does not exist"
+    md5 -q ${FILE} > ${FILE}.md5    
+    shasum -p -a 512 ${FILE} | awk '{print$1}' > ${FILE}.sha512
+}
+
+for bundle in ${BUNDLE_DIR}/*.tar.gz
+do
+    makeFileChecksums ${bundle}
+done
+
+for bundle in ${BUNDLE_DIR}/*.zip
+do
+    makeFileChecksums ${bundle}
+done
+
+echo
+echo "SUCCESS: all checksum files generated"

http://git-wip-us.apache.org/repos/asf/incubator-edgent/blob/7a2707ac/buildTools/stage_release_candidate.sh
----------------------------------------------------------------------
diff --git a/buildTools/stage_release_candidate.sh 
b/buildTools/stage_release_candidate.sh
index e726107..fa63782 100755
--- a/buildTools/stage_release_candidate.sh
+++ b/buildTools/stage_release_candidate.sh
@@ -29,11 +29,12 @@ set -e
 # Prompts before taking actions.
 #
 # Run from the root of the release management git clone.
+# Defaults bundle-dir to target/checkout/target (mvn release:perform generated)
 
 
 . `dirname $0`/common.sh
 
-setUsage "`basename $0` <rc-num>"
+setUsage "`basename $0` <rc-num> [bundle-dir]"
 handleHelp "$@"
 
 requireArg "$@"
@@ -41,13 +42,18 @@ RC_NUM=$1; shift
 checkRcNum ${RC_NUM} || usage "Not a release candidate number \"${RC_NUM}\""
 RC_DIRNAME="rc${RC_NUM}"
 
+BUNDLE_DIR=target/checkout/target
+if [ $# -gt 0 ]; then
+  BUNDLE_DIR=$1; shift
+fi
+
 noExtraArgs "$@"
 
 SVN_DEV_EDGENT=~/svn/dist.apache.org/repos/dist/dev/incubator/edgent
 
 checkBundleDir || die "Bundle directory '${BUNDLE_DIR}' does not exist" 
 
-checkUsingMgmtCloneWarn || confirm "Proceed using this clone?" || exit
+# checkUsingMgmtCloneWarn || confirm "Proceed using this clone?" || exit
 
 # Get the X.Y.Z version from the bundle name
 VER=`getEdgentVer bundle`
@@ -58,6 +64,16 @@ RC_TAG=`getReleaseTag ${VER} ${RC_NUM}`
 echo "Base svn Edgent dev directory to stage to: ${SVN_DEV_EDGENT}"
 confirm "Proceed with staging for ${RC_TAG}?" || exit
 
+# at least until checksum file generation is automated verify that
+# make_checksums.sh has been run
+echo "Checking that bundle signature files are present ..."
+for b in ${BUNDLE_DIR}/apache-edgent-*-source-release.*; do
+  for sfx in .asc .md5 .sha512; do
+    f=${b}${sfx}
+    [ -f ${f} ] || die "Bundle signature ${f} does not exist"
+  done
+done
+
 # Offer to do svn checkout if needed
 if [ ! -d ${SVN_DEV_EDGENT}/.svn ]; then
   echo "${SVN_DEV_EDGENT}/.svn: No such file or directory"
@@ -85,11 +101,7 @@ confirm "Is the svn status ok to continue (blank / nothing 
reported) ?" || exit
 #   rc<n>
 #     README
 #     RELEASE_NOTES
-#     LICENSE
 #     source bundles and signatures
-#     binaries
-#       LICENSE
-#       source bundles and signatures
 
 echo ""
 echo "Copying artifacts to ${SVN_DEV_EDGENT}..." 
@@ -103,14 +115,9 @@ if [ ! -d ${SVN_VER_DIR} ]; then
 fi
 
 mkdir -p ${SVN_RC_DIR}
-cp LICENSE ${SVN_RC_DIR}
 cp README ${SVN_RC_DIR}
 cp RELEASE_NOTES ${SVN_RC_DIR}
-cp ${BUNDLE_DIR}/*-src.* ${SVN_RC_DIR}
-
-mkdir -p ${SVN_RC_DIR}/binaries
-cp binary-release/LICENSE ${SVN_RC_DIR}/binaries
-cp ${BUNDLE_DIR}/*-bin.* ${SVN_RC_DIR}/binaries
+cp ${BUNDLE_DIR}/apache-edgent-*-source-release.* ${SVN_RC_DIR}
 
 if [ ! `svn info --show-item url ${SVN_VER_DIR} 2>/dev/null` ]; then
   (set -x; svn add ${SVN_VER_DIR})

Reply via email to