This is an automated email from the ASF dual-hosted git repository.

onichols pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git


The following commit(s) were added to refs/heads/develop by this push:
     new fff9853  GEODE-8069: fix release script issues (#5050)
fff9853 is described below

commit fff985340fb652231dbac5b959386c0334ebfb11
Author: Owen Nichols <[email protected]>
AuthorDate: Sat May 16 00:55:32 2020 -0700

    GEODE-8069: fix release script issues (#5050)
    
    fix versions and other issues encountered creating the support branches
    * clarify which new version to add to Jira
    * don't enable metrics by default, since they don't work
    * always create a starting build number for proper version cmp in concourse
    * do not use less as pager during release scripts, as it is confusing to 
need to press Q to continue
    * mention that prepare_rc can be re-run without commenting out completed 
steps, if desired
    * GEODE-8016: switch from -SNAPSHOT to -build.n
    * revise semantic version selector to use for geode-examples to find geode
    * ensure we are in correct dir for executing sub-scripts
    * dont fail if temp commit has already been reverted
---
 ci/pipelines/meta/deploy_meta.sh             |  1 -
 ci/pipelines/shared/jinja.variables.yml      |  2 +-
 dev-tools/release/commit_rc.sh               |  5 ++--
 dev-tools/release/create_support_branches.sh | 43 +++++++++++++++-------------
 dev-tools/release/end_of_support.sh          |  2 +-
 dev-tools/release/license_review.sh          |  4 +--
 dev-tools/release/prepare_rc.sh              | 14 +++++----
 dev-tools/release/promote_rc.sh              | 12 ++++----
 dev-tools/release/set_copyright.sh           |  2 +-
 dev-tools/release/set_versions.sh            | 36 +++++++++++------------
 10 files changed, 64 insertions(+), 57 deletions(-)

diff --git a/ci/pipelines/meta/deploy_meta.sh b/ci/pipelines/meta/deploy_meta.sh
index b093f08..7ae0fe6 100755
--- a/ci/pipelines/meta/deploy_meta.sh
+++ b/ci/pipelines/meta/deploy_meta.sh
@@ -279,7 +279,6 @@ unpausePipeline ${PIPELINE_PREFIX}main
 if [[ "$GEODE_FORK" == "${UPSTREAM_FORK}" ]]; then
   if [[ "${PUBLIC}" == "true" ]]; then
     exposePipelines ${PIPELINE_PREFIX}main ${PIPELINE_PREFIX}images
-    enableFeature metrics
     enableFeature examples
   fi
   if [[ "$GEODE_BRANCH" == "develop" ]]; then
diff --git a/ci/pipelines/shared/jinja.variables.yml 
b/ci/pipelines/shared/jinja.variables.yml
index c1f7d7a..17de4be 100644
--- a/ci/pipelines/shared/jinja.variables.yml
+++ b/ci/pipelines/shared/jinja.variables.yml
@@ -66,7 +66,7 @@ java_test_versions:
   version: 11
 
 metadata:
-  initial_version: 1.14.0-((semver-prerelease-token))
+  initial_version: 1.14.0-((semver-prerelease-token)).0
 
 publish_artifacts:
   CPUS: '8'
diff --git a/dev-tools/release/commit_rc.sh b/dev-tools/release/commit_rc.sh
index e60822f..7a85f4c 100755
--- a/dev-tools/release/commit_rc.sh
+++ b/dev-tools/release/commit_rc.sh
@@ -101,7 +101,7 @@ sed -e 's#^geodeRepositoryUrl *=.*#geodeRepositoryUrl = 
https://repository.apach
 rm gradle.properties.bak
 set -x
 git add gradle.properties
-git diff --staged
+git diff --staged --color | cat
 git commit -m "temporarily point to staging repo for CI purposes"
 git push
 set +x
@@ -109,8 +109,9 @@ set +x
 
 echo ""
 echo "============================================================"
-echo "Re-adding -SNAPSHOT in case this is not the final RC"
+echo "Restoring -build suffix to version"
 echo "============================================================"
+cd ${GEODE}/../..
 set -x
 ${0%/*}/set_versions.sh -v ${VERSION} -s -n -w "${WORKSPACE}"
 set +x
diff --git a/dev-tools/release/create_support_branches.sh 
b/dev-tools/release/create_support_branches.sh
index 63a7a63..95ba74c 100755
--- a/dev-tools/release/create_support_branches.sh
+++ b/dev-tools/release/create_support_branches.sh
@@ -59,8 +59,9 @@ MINOR=${VERSION_MM#*.}
 NEWMAJOR=${MAJOR}
 NEWMINOR=$((MINOR + 1))
 
-NEWVERSION=${NEWMAJOR}.${NEWMINOR}
-NEWVERSION_NODOT=${NEWVERSION//./}
+NEWVERSION_MM=${NEWMAJOR}.${NEWMINOR}
+NEWVERSION_MM_NODOT=${NEWVERSION_MM//./}
+NEWVERSION=${NEWVERSION_MM}.0
 
 set -x
 WORKSPACE=$PWD/support-${VERSION_MM}-workspace
@@ -112,6 +113,7 @@ function failMsg2 {
 trap 'failMsg2 $LINENO' ERR
 
 
+cd ${GEODE}/../..
 set -x
 ${0%/*}/set_copyright.sh ${GEODE} ${GEODE_DEVELOP} ${GEODE_EXAMPLES} 
${GEODE_EXAMPLES_DEVELOP} ${GEODE_NATIVE} ${GEODE_BENCHMARKS}
 set +x
@@ -141,7 +143,7 @@ for DIR in ${GEODE} ${GEODE_EXAMPLES} ${GEODE_NATIVE} 
${GEODE_BENCHMARKS} ; do
     set -x
     cd ${DIR}
     git checkout -b support/${VERSION_MM}
-    git push -u origin
+    git push -u origin support/${VERSION_MM}
     set +x
 done
 
@@ -157,11 +159,11 @@ git remote add myfork 
[email protected]:${GITHUB_USER}/geode.git || true
 git checkout -b roll-develop-to-${NEWVERSION}
 set +x
 
-#version = 1.13.0-SNAPSHOT
-sed -e "s/^version =.*/version = ${NEWVERSION}-SNAPSHOT/" -i.bak 
gradle.properties
+#version = 1.13.0-build.0
+sed -e "s/^version =.*/version = ${NEWVERSION}-build.0/" -i.bak 
gradle.properties
 
-#  initial_version: 1.13.0-SNAPSHOT
-sed -e "s/^  initial_version:.*/  initial_version: ${NEWVERSION}-SNAPSHOT/" 
-i.bak ./ci/pipelines/shared/jinja.variables.yml
+#  initial_version: 1.13.0-((stuff)).0
+sed -e "s/^  initial_version:[^-]*\(-[^.0-9]*\)[.0-9]*/  initial_version: 
${NEWVERSION}\1.0/" -i.bak ./ci/pipelines/shared/jinja.variables.yml
 
 
VER=geode-serialization/src/main/java/org/apache/geode/internal/serialization/Version.java
 #add the new ordinal and Version constants and set them as current&highest
@@ -189,20 +191,20 @@ sed -e "s#return 
Collections.unmodifiableMap(allCommands#allCommands.put(Version
 #  product_version_nodot: '113'
 #  product_version_geode: '1.13'
 sed -E \
-    -e "s#docs/guide/[0-9]+#docs/guide/${NEWVERSION_NODOT}#" \
-    -e "s#product_version: '[0-9.]+'#product_version: '${NEWVERSION}'#" \
-    -e "s#version_nodot: '[0-9]+'#version_nodot: '${NEWVERSION_NODOT}'#" \
-    -e "s#product_version_geode: '[0-9.]+'#product_version_geode: 
'${NEWVERSION}'#" \
+    -e "s#docs/guide/[0-9]+#docs/guide/${NEWVERSION_MM_NODOT}#" \
+    -e "s#product_version: '[0-9.]+'#product_version: '${NEWVERSION_MM}'#" \
+    -e "s#version_nodot: '[0-9]+'#version_nodot: '${NEWVERSION_MM_NODOT}'#" \
+    -e "s#product_version_geode: '[0-9.]+'#product_version_geode: 
'${NEWVERSION_MM}'#" \
     -i.bak geode-book/config.yml
 
 #rewrite '/', '/docs/guide/113/about_geode.html'
 #rewrite '/index.html', '/docs/guide/113/about_geode.html'
-sed -E -e "s#docs/guide/[0-9]+#docs/guide/${NEWVERSION_NODOT}#" -i.bak 
geode-book/redirects.rb
+sed -E -e "s#docs/guide/[0-9]+#docs/guide/${NEWVERSION_MM_NODOT}#" -i.bak 
geode-book/redirects.rb
 
 rm gradle.properties.bak ci/pipelines/shared/jinja.variables.yml.bak 
geode-book/config.yml.bak geode-book/redirects.rb.bak $VER.bak* $COM.bak*
 set -x
 git add .
-git diff --staged
+git diff --staged --color | cat
 
 ./gradlew updateExpectedPom
 
@@ -220,17 +222,17 @@ cd ${GEODE_EXAMPLES_DEVELOP}
 git pull -r
 set +x
 
-#version = 1.13.0-SNAPSHOT
-#geodeVersion = 1.13.0-SNAPSHOT
+#version = 1.13.0-build.0
+#geodeVersion = 1.13.0-build+
 sed \
-  -e "s/^version =.*/version = ${NEWVERSION}-SNAPSHOT/" \
-  -e "s/^geodeVersion =.*/geodeVersion = ${NEWVERSION}-SNAPSHOT/" \
+  -e "s/^version =.*/version = ${NEWVERSION}-build.0/" \
+  -e "s/^geodeVersion =.*/geodeVersion = ${NEWVERSION_MM}.+/" \
   -i.bak gradle.properties
 rm gradle.properties.bak
 set -x
 git add gradle.properties
-git diff --staged
-git commit -m "point develop examples to ${NEWVERSION}-SNAPSHOT now that 
support/${VERSION_MM} has been created"
+git diff --staged --color | cat
+git commit -m "pair develop examples with ${NEWVERSION} now that 
support/${VERSION_MM} has been created"
 git push -u origin
 set +x
 
@@ -239,6 +241,7 @@ echo ""
 echo "============================================================"
 echo "Setting version on support/${VERSION_MM}"
 echo "============================================================"
+cd ${GEODE}/../..
 set -x
 ${0%/*}/set_versions.sh -v ${VERSION_MM}.0 -s -w "${WORKSPACE}"
 set +x
@@ -261,6 +264,6 @@ cd ${GEODE}/../..
 echo "Next steps:"
 echo "1. Go to 
https://github.com/${GITHUB_USER}/geode/pull/new/roll-develop-to-${NEWVERSION} 
and create the pull request"
 echo "2. Plus the BumpMinor job at 
https://concourse.apachegeode-ci.info/teams/main/pipelines/apache-develop-main?group=Semver%20Management";
-echo "3. Add the new version to Jira at 
https://issues.apache.org/jira/projects/GEODE?selectedItem=com.atlassian.jira.jira-projects-plugin:release-page";
+echo "3. Add ${NEWVERSION} to Jira at 
https://issues.apache.org/jira/projects/GEODE?selectedItem=com.atlassian.jira.jira-projects-plugin:release-page";
 echo "4. (cd ${GEODE}/ci/pipelines/meta && ./deploy_meta.sh) #takes about 2 
hours. keep re-running until successful."
 echo "5. That's it for now.  Once all needed fixes have been proposed and 
cherry-picked to support/${VERSION_MM} and 
https://concourse.apachegeode-ci.info/teams/main/pipelines/apache-support-${VERSION_MM/./-}-main
 is green, come back and run ${0%/*}/prepare_rc.sh -v ${VERSION}.RC1"
diff --git a/dev-tools/release/end_of_support.sh 
b/dev-tools/release/end_of_support.sh
index a874243..837e299 100755
--- a/dev-tools/release/end_of_support.sh
+++ b/dev-tools/release/end_of_support.sh
@@ -125,4 +125,4 @@ echo 
"============================================================"
 echo "Done shutting down the support branch!"
 echo "============================================================"
 echo "Don't forget to remove the JIRA Release placeholder for any future 
${VERSION_MM}.x"
-echo "Probably also a good idea to announce on the dev list that 
support/${VERSION_MM} has expired"
\ No newline at end of file
+echo "Probably also a good idea to announce on the dev list that 
support/${VERSION_MM} has expired"
diff --git a/dev-tools/release/license_review.sh 
b/dev-tools/release/license_review.sh
index a595f8c..39f46a9 100755
--- a/dev-tools/release/license_review.sh
+++ b/dev-tools/release/license_review.sh
@@ -72,7 +72,7 @@ function resolve() {
   if [ "HEAD" = "$spec" ] ; then
     [ "${suffix}" = "-src" ] && target=srcDistTar || target=distTar
     (cd $root && ./gradlew ${target} 1>&2)
-    spec=$root/geode-assembly/build/distributions/$(cd 
$root/geode-assembly/build/distributions && ls -t | grep 
apache-geode-.*-SNAPSHOT${suffix}.tgz | tail -1)
+    spec=$root/geode-assembly/build/distributions/$(cd 
$root/geode-assembly/build/distributions && ls -t | grep -v sha256 | grep 
"apache-geode-.*-build.[0-9][0-9]*${suffix}.tgz" | tail -1)
     [ -r "$spec" ] || echo "Build not found: $spec" 1>&2
     [ -r "$spec" ]
   fi
@@ -156,7 +156,7 @@ function generateList() {
 
   echo "**** ${dir##*/} wars ****" | tr '[:lower:]-' '[:upper:] ' > 
$dir/report2
   (cd $dir; find . -name '*.war' | sort | sed 's#^./##' | while read war ; do
-    listJarsInWar $war | sed 's#-[v0-9][-0-9.SNAPSHOT]*[.]#.#' | sort
+    listJarsInWar $war | sed 's#-[v0-9][-0-9.SNAPSHOTbuild]*[.]#.#' | sort
     extractLicense $war ${war%.war}.LICENSE
   done | tee -a report2)
 }
diff --git a/dev-tools/release/prepare_rc.sh b/dev-tools/release/prepare_rc.sh
index 1145c0c..05346cd 100755
--- a/dev-tools/release/prepare_rc.sh
+++ b/dev-tools/release/prepare_rc.sh
@@ -146,16 +146,17 @@ svn update --set-depth infinity --parents dist/dev/geode
 set +x
 
 
+cd ${GEODE}/../..
 set -x
 ${0%/*}/set_copyright.sh ${GEODE} ${GEODE_EXAMPLES} ${GEODE_NATIVE} 
${GEODE_BENCHMARKS}
-
 set +x
 
 
 echo ""
 echo "============================================================"
-echo "Removing -SNAPSHOT"
+echo "Removing -build suffix from version"
 echo "============================================================"
+cd ${GEODE}/../..
 set -x
 ${0%/*}/set_versions.sh -v ${VERSION} -n -w ${WORKSPACE}
 set +x
@@ -185,8 +186,10 @@ if [ "${FULL_VERSION##*.RC}" -gt 1 ] ; then
     rm gradle.properties.bak
     set -x
     git add gradle.properties
-    git diff --staged
-    git commit -m 'Revert "temporarily point to staging repo for CI purposes"'
+    if [ $(git diff --staged | wc -l) -gt 0 ] ; then
+        git diff --staged --color | cat
+        git commit -m 'Revert "temporarily point to staging repo for CI 
purposes"'
+    fi
     set +x
 fi
 
@@ -248,7 +251,8 @@ set +x
 function failMsg2 {
   errln=$1
   echo "ERROR: script did NOT complete successfully"
-  echo "Comment out any steps that already succeeded (approximately lines 
116-$(( errln - 1 ))) and try again"
+  echo "Comment out any steps that already succeeded (approximately lines 
120-$(( errln - 1 ))) and try again"
+  echo "For this script only (prepare_rc.sh), it's also safe to just try again 
from the top"
 }
 trap 'failMsg2 $LINENO' ERR
 
diff --git a/dev-tools/release/promote_rc.sh b/dev-tools/release/promote_rc.sh
index 80a1e74..b8833d1 100755
--- a/dev-tools/release/promote_rc.sh
+++ b/dev-tools/release/promote_rc.sh
@@ -187,7 +187,7 @@ else
   rm apache-geode.rb.bak
   set -x
   git add apache-geode.rb
-  git diff --staged
+  git diff --staged --color | cat
   git commit -m "apache-geode ${VERSION}"
   git push -u myfork
   set +x
@@ -209,7 +209,7 @@ sed -e "s/^ENV GEODE_GPG.*/ENV GEODE_GPG ${SIGNING_KEY}/" \
 rm Dockerfile.bak
 set -x
 git add Dockerfile
-git diff --staged
+git diff --staged --color | cat
 git commit -m "apache-geode ${VERSION}"
 git push
 set +x
@@ -230,7 +230,7 @@ sed -e 
"/wget.*closer.*apache-geode-/s#http.*filename=geode#https://downloads.ap
 rm Dockerfile.bak
 set -x
 git add Dockerfile
-git diff --staged
+git diff --staged --color | cat
 git commit -m "apache-geode ${VERSION}"
 git push
 set +x
@@ -296,7 +296,7 @@ sed -e 's#^geodeRepositoryUrl *=.*#geodeRepositoryUrl =#' \
 rm gradle.properties.bak
 set -x
 git add gradle.properties
-git diff --staged
+git diff --staged --color | cat
 git commit -m 'Revert "temporarily point to staging repo for CI purposes"'
 git push
 set +x
@@ -369,7 +369,7 @@ if [ $PATCH -eq 0 ] ; then
 fi
 set -x
 git add settings.gradle
-git diff --staged
+git diff --staged --color | cat
 git commit -m "add ${VERSION} to old versions${BENCHMSG} on develop"
 git push -u myfork
 set +x
@@ -390,7 +390,7 @@ sed -e "s/].each/,\\
 rm settings.gradle.bak
 set -x
 git add settings.gradle
-git diff --staged
+git diff --staged --color | cat
 git commit -m "add ${VERSION} to old versions on support/$VERSION_MM"
 git push
 set +x
diff --git a/dev-tools/release/set_copyright.sh 
b/dev-tools/release/set_copyright.sh
index e67db47..db52a24 100755
--- a/dev-tools/release/set_copyright.sh
+++ b/dev-tools/release/set_copyright.sh
@@ -49,8 +49,8 @@ for DIR in $@ ; do
       -i.bak NOTICE
     rm -f NOTICE.bak
     git add NOTICE
-    git diff --staged
     if [ $(git diff --staged | wc -l) -gt 0 ] ; then
+      git diff --staged --color | cat
       git commit -a -m "Bumping copyright year to ${year}"
     fi
 done
diff --git a/dev-tools/release/set_versions.sh 
b/dev-tools/release/set_versions.sh
index be34b15..5cbf385 100755
--- a/dev-tools/release/set_versions.sh
+++ b/dev-tools/release/set_versions.sh
@@ -20,7 +20,7 @@ set -e
 usage() {
     echo "Usage: set_versions.sh -v version_number [-s]"
     echo "  -v   The #.#.# version number for the next release"
-    echo "  -s   append -SNAPSHOT to version number"
+    echo "  -s   append -build.0 to version number"
     exit 1
 }
 
@@ -32,7 +32,7 @@ while getopts ":v:snw:" opt; do
       VERSION=$OPTARG
       ;;
     s )
-      SNAPSHOT="-SNAPSHOT"
+      BUILDSUFFIX="-build.0"
       ;;
     n )
       NOPUSH=true
@@ -58,6 +58,12 @@ fi
 
 VERSION_MM=${VERSION%.*}
 
+if [ -n "${BUILDSUFFIX}" ] ; then
+  GEODEFOREXAMPLES="${VERSION_MM}.+"
+else
+  GEODEFOREXAMPLES="${VERSION}"
+fi
+
 set -x
 [ -n "${WORKSPACE}" ] || WORKSPACE=$PWD/release-${VERSION}-workspace
 GEODE=$WORKSPACE/geode
@@ -108,23 +114,17 @@ echo "Setting Geode versions and updating expected pom"
 echo "============================================================"
 set -x
 cd ${GEODE}
-git pull
 set +x
 
-#version = 1.13.0-SNAPSHOT
-sed -e "s/^version =.*/version = ${VERSION}${SNAPSHOT}/" -i.bak 
gradle.properties
+#version = 1.13.0-build.0
+sed -e "s/^version =.*/version = ${VERSION}${BUILDSUFFIX}/" -i.bak 
gradle.properties
 
 rm gradle.properties.bak
 set -x
 git add gradle.properties
-git diff --staged
-
-./gradlew updateExpectedPom
-git add .
-echo "$(git diff --staged | wc -l)-line diff of expected-pom changes will also 
be committed (not shown)"
-
 if [ $(git diff --staged | wc -l) -gt 0 ] ; then
-  git commit -m "Bumping version to ${VERSION}${SNAPSHOT}"
+  git diff --staged --color | cat
+  git commit -m "Bumping version to ${VERSION}${BUILDSUFFIX}"
   [ "$NOPUSH" = "true" ] || git push -u origin
 fi
 set +x
@@ -139,18 +139,18 @@ cd ${GEODE_EXAMPLES}
 git pull
 set +x
 
-#version = 1.12.0-SNAPSHOT
-#geodeVersion = 1.12.0-SNAPSHOT
-sed -e "s/^version = .*/version = ${VERSION}${SNAPSHOT}/" \
-    -e "s/^geodeVersion = .*/geodeVersion = ${VERSION}${SNAPSHOT}/" \
+#version = 1.12.0-build.0
+#geodeVersion = 1.12.+
+sed -e "s/^version = .*/version = ${VERSION}${BUILDSUFFIX}/" \
+    -e "s/^geodeVersion = .*/geodeVersion = ${GEODEFOREXAMPLES}/" \
     -i.bak gradle.properties
 
 rm gradle.properties.bak
 set -x
 git add .
-git diff --staged
 if [ $(git diff --staged | wc -l) -gt 0 ] ; then
-  git commit -m "Bumping version to ${VERSION}${SNAPSHOT}"
+  git diff --staged --color | cat
+  git commit -m "Bumping version to ${VERSION}${BUILDSUFFIX}"
   [ "$NOPUSH" = "true" ] || git push -u origin
 fi
 set +x

Reply via email to