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 83bd748 GEODE-8481: fix a few release script issues (#5899)
83bd748 is described below
commit 83bd74869e9cf39e31f4c80043e73c1458a4a14e
Author: Owen Nichols <[email protected]>
AuthorDate: Thu Feb 25 21:07:01 2021 -0800
GEODE-8481: fix a few release script issues (#5899)
* placeholder for branching from specific SHA if necessary
* commit message including build number is needlessly confusing (and
potentially misleading since build number comes from pipeline)
* remove release scripts from created support branch to avoid confusion
* update all copyrights not just top-level notice
* adjust Version to KnownVersion going forward
* run expected-file tests after dependency bumps as transitive resolutions
could have changed
* full checkout for geode-develop to ensure we get all tags
* always generate sha (it is needed later even if not doing brew)
* don't create nested tags
* fix printing of removed releases
* skip prompt to manually perform brew steps for non-latest releases
* add docker tag to docker test command if not latest release
* as per PR#6050 don't add new commandset for new minor, instead add new
constructor param to retain last client serialization version
---
dev-tools/dependencies/bump.sh | 2 +-
dev-tools/release/commit_rc.sh | 3 +-
dev-tools/release/create_support_branches.sh | 42 ++++++++++++++++++----------
dev-tools/release/prepare_rc.sh | 7 +++--
dev-tools/release/promote_rc.sh | 33 ++++++++++++----------
dev-tools/release/set_copyright.sh | 16 ++++++-----
dev-tools/release/set_versions.sh | 4 +--
7 files changed, 64 insertions(+), 43 deletions(-)
diff --git a/dev-tools/dependencies/bump.sh b/dev-tools/dependencies/bump.sh
index 51f66f5..203ce05 100755
--- a/dev-tools/dependencies/bump.sh
+++ b/dev-tools/dependencies/bump.sh
@@ -57,4 +57,4 @@ if [ $(git diff | wc -l) -gt 0 ] ; then
git stash
git stash drop
fi
-./gradlew devBuild
+./gradlew devBuild :geode-assembly:integrationTest --tests
AssemblyContentsIntegrationTest --tests GeodeDependencyJarIntegrationTest
--tests BundledJarsJUnitTest --tests GemfireCoreClasspathTest
diff --git a/dev-tools/release/commit_rc.sh b/dev-tools/release/commit_rc.sh
index 7331a12..eaf8a12 100755
--- a/dev-tools/release/commit_rc.sh
+++ b/dev-tools/release/commit_rc.sh
@@ -124,7 +124,6 @@ echo
"============================================================"
for DIR in ${GEODE} ${GEODE_EXAMPLES} ${GEODE_NATIVE} ${GEODE_BENCHMARKS} ; do
set -x
cd ${DIR}
- git pull -r
git push -u origin
git push origin rel/v${FULL_VERSION}
set +x
@@ -136,7 +135,7 @@ echo
"============================================================"
echo "Done publishing the release candidate! Next steps:"
echo "============================================================"
cd ${GEODE}/../..
-echo "1. ${0%/*}/deploy_rc_pipeline.sh -v ${VERSION_MM}"
+echo "1. In a separate terminal window, ${0%/*}/deploy_rc_pipeline.sh -v
${VERSION_MM}"
echo "2. Monitor
https://concourse.apachegeode-ci.info/teams/main/pipelines/apache-support-${VERSION_MM//./-}-rc
until all green"
echo "3. Send the following email to announce the RC:"
echo "To: [email protected]"
diff --git a/dev-tools/release/create_support_branches.sh
b/dev-tools/release/create_support_branches.sh
index d74c7eb..31b31ff 100755
--- a/dev-tools/release/create_support_branches.sh
+++ b/dev-tools/release/create_support_branches.sh
@@ -97,6 +97,7 @@ echo "Cloning repositories..."
echo "============================================================"
set -x
git clone --single-branch --branch develop [email protected]:apache/geode.git
+#(cd geode; git reset --hard $desired_sha) #uncomment if latest commit is not
the desired branchpoint
git clone --single-branch --branch develop [email protected]:apache/geode.git
geode-develop
git clone --single-branch --branch develop
[email protected]:apache/geode-examples.git
git clone --single-branch --branch develop
[email protected]:apache/geode-examples.git geode-examples-develop
@@ -108,7 +109,7 @@ set +x
function failMsg2 {
errln=$1
echo "ERROR: script did NOT complete successfully"
- echo "Comment out any steps that already succeeded (approximately lines
70-$(( errln - 1 ))) and try again"
+ echo "Comment out any steps that already succeeded (approximately lines
83-$(( errln - 1 ))) and try again"
}
trap 'failMsg2 $LINENO' ERR
@@ -128,7 +129,7 @@ echo
"============================================================"
for DIR in ${GEODE_NATIVE} ${GEODE_BENCHMARKS} ; do
set -x
cd ${DIR}
- if ! [ git push --dry-run 2>&1 | grep -q 'Everything up-to-date' ] ; then
+ if ! git push --dry-run 2>&1 | grep -q 'Everything up-to-date' ; then
git push -u origin
fi
set +x
@@ -167,26 +168,22 @@ sed -e "s/^ initial_version:[^-]*\(-[^.0-9]*\)[.0-9]*/
initial_version: ${NEWV
VER=geode-serialization/src/main/java/org/apache/geode/internal/serialization/KnownVersion.java
[ -r $VER ] ||
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
+#add the new ordinal and KnownVersion constants and set them as current&highest
CURORD=$(cat $VER | awk '/private static final short GEODE_.*_ORDINAL/{print
$NF}' | tr -d ';' | sort -n | tail -1)
-NEWORD=$(( CURORD + 5 ))
+NEWORD=$(( CURORD + 10 ))
+LATEST_CLIENT_ORD=$(cat $VER | grep '^ *GEODE_.*ORDINAL,' | tr ')' ' ' | awk
'{v=$2}END{print v}')
sed -e "s#/. NOTE: when adding a new version#private static final short
GEODE_${NEWMAJOR}_${NEWMINOR}_0_ORDINAL = ${NEWORD};\\
\\
@Immutable\\
- public static final Version GEODE_${NEWMAJOR}_${NEWMINOR}_0 =\\
- new Version("'"'"GEODE"'"'", "'"'"${NEWMAJOR}.${NEWMINOR}.0"'"'", (byte)
${NEWMAJOR}, (byte) ${NEWMINOR}, (byte) 0, (byte) 0,
GEODE_${NEWMAJOR}_${NEWMINOR}_0_ORDINAL);\\
+ public static final KnownVersion GEODE_${NEWMAJOR}_${NEWMINOR}_0 =\\
+ new KnownVersion("'"'"GEODE"'"'", "'"'"${NEWMAJOR}.${NEWMINOR}.0"'"'",
(byte) ${NEWMAJOR}, (byte) ${NEWMINOR}, (byte) 0, (byte) 0,\\
+ GEODE_${NEWMAJOR}_${NEWMINOR}_0_ORDINAL, ${LATEST_CLIENT_ORD});\\
\\
/* NOTE: when adding a new version#" \
- -e "/public static final Version
CURRENT/s#GEODE[0-9_]*#GEODE_${NEWMAJOR}_${NEWMINOR}_0#" \
+ -e "/public static final KnownVersion
CURRENT/s#GEODE[0-9_]*#GEODE_${NEWMAJOR}_${NEWMINOR}_0#" \
-e "/public static final int HIGHEST_VERSION/s# = [0-9]*# = ${NEWORD}#" \
-i.bak $VER
-COM=geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/CommandInitializer.java
-#add to list of all commands
-sed -e "s#return
Collections.unmodifiableMap(allCommands#allCommands.put(Version.GEODE_${NEWMAJOR}_${NEWMINOR}_0,
geode18Commands);\\
- return Collections.unmodifiableMap(allCommands#" \
- -i.bak $COM
-
# directory: docs/guide/113
# product_version: '1.13.2'
# product_version_nodot: '113'
@@ -202,7 +199,7 @@ sed -E \
#rewrite '/index.html', '/docs/guide/113/about_geode.html'
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*
+rm gradle.properties.bak ci/pipelines/shared/jinja.variables.yml.bak
geode-book/config.yml.bak geode-book/redirects.rb.bak $VER.bak*
set -x
git add .
git diff --staged --color | cat
@@ -240,6 +237,23 @@ set +x
echo ""
echo "============================================================"
+echo "Removing duplicate scripts from support/${VERSION_MM}"
+echo "============================================================"
+set -x
+cd ${GEODE}/dev-tools/release
+git pull -r
+git rm *.sh
+cat << EOF > README.md
+See [Releasing Apache
Geode](https://cwiki.apache.org/confluence/display/GEODE/Releasing+Apache+Geode)
+EOF
+git add README.md
+git commit -m "remove outdated copies of release scripts to ensure they are
not run by accident"
+git push -u origin
+set +x
+
+
+echo ""
+echo "============================================================"
echo "Setting version on support/${VERSION_MM}"
echo "============================================================"
cd ${GEODE}/../..
diff --git a/dev-tools/release/prepare_rc.sh b/dev-tools/release/prepare_rc.sh
index 382dfdd..2143a00 100755
--- a/dev-tools/release/prepare_rc.sh
+++ b/dev-tools/release/prepare_rc.sh
@@ -140,8 +140,9 @@ echo "Cloning repositories..."
echo "============================================================"
set -x
git clone --single-branch --branch support/${VERSION_MM}
[email protected]:apache/geode.git
-#(cd geode; git reset --hard $desired_sha) #uncomment if latest commit is not
the one desired
-git clone --single-branch --branch develop [email protected]:apache/geode.git
geode-develop
+#if you attempt to reset to a prior SHA here, skip ${GEODE} in
set_copyright.sh or it may backfire
+#(cd geode; git reset --hard $desired_sha) #uncomment if latest commit is not
the desired sha
+git clone [email protected]:apache/geode.git geode-develop
git clone --single-branch --branch support/${VERSION_MM}
[email protected]:apache/geode-examples.git
git clone --single-branch --branch support/${VERSION_MM}
[email protected]:apache/geode-native.git
git clone --single-branch --branch develop
[email protected]:apache/geode-native.git geode-native-develop
@@ -343,5 +344,5 @@ echo "1. Go to https://repository.apache.org, login as
${APACHE_USERNAME}, and c
echo "2. If there is a prior ${VERSION} RC, select it and click Drop."
echo '3. Make a note of the 4-digit ID of the current ("implicitly created")
staging repo.'
echo '4. Select the current staging repo and click Close.'
-echo '5. Wait ~15 minutes for status to become "Closed"'
+echo '5. Wait ~10 seconds and then refresh the page to confirm that status has
become "Closed"'
echo "6. Run ${0%/*}/commit_rc.sh -v ${FULL_VERSION} -m
<4-DIGIT-ID-NOTED-ABOVE>"
diff --git a/dev-tools/release/promote_rc.sh b/dev-tools/release/promote_rc.sh
index 9d3baaf..ec6fadd 100755
--- a/dev-tools/release/promote_rc.sh
+++ b/dev-tools/release/promote_rc.sh
@@ -102,10 +102,10 @@ echo
"============================================================"
echo "Checking for later versions..."
echo "============================================================"
cd ${GEODE_DEVELOP}
-latestnv=$(git tag| grep '^rel/v' | grep -v RC | cut -c6- | egrep
'^[0-9]+\.[0-9]+\.[0-9]+$' | awk -F. '/KEYS/{next}{print
1000000*$1+1000*$2+$3,$1"."$2"."$3}' | sort -n | tail -1)
+latestnv=$(git tag| grep '^rel/v' | grep -v RC | cut -c6- | egrep
'^[0-9]+\.[0-9]+\.[0-9]+$' | awk -F. '{print
1000000*$1+1000*$2+$3,$1"."$2"."$3}' | sort -n | tail -1)
latestn=$(echo $latestnv | awk '{print $1}')
latestv=$(echo $latestnv | awk '{print $2}')
-thisre=$(echo $VERSION | awk -F. '/KEYS/{next}{print 1000000*$1+1000*$2+$3}')
+thisre=$(echo $VERSION | awk -F. '{print 1000000*$1+1000*$2+$3}')
if [ $latestn -gt $thisre ] ; then
LATER=$latestv
echo "Later version $LATER found; $VERSION will not be merged to master or
tagged as 'latest' in docker."
@@ -135,7 +135,7 @@ echo
"============================================================"
for DIR in ${GEODE} ${GEODE_EXAMPLES} ${GEODE_NATIVE} ${GEODE_BENCHMARKS} ; do
set -x
cd ${DIR}
- git tag -s -u ${SIGNING_KEY} rel/v${VERSION} -m "Apache Geode v${VERSION}
release" rel/v${FULL_VERSION}
+ git tag -s -u ${SIGNING_KEY} rel/v${VERSION} -m "Apache Geode v${VERSION}
release" rel/v${FULL_VERSION}^{}
git push origin rel/v${VERSION}
set +x
done
@@ -163,6 +163,7 @@ done
echo ""
echo "============================================================"
+GEODE_SHA=$(awk '{print $1}' <
$WORKSPACE/dist/release/geode/${VERSION}/apache-geode-${VERSION}.tgz.sha256)
if [ -n "$LATER" ] ; then
echo "NOT updating brew to avoid overwriting newer version $LATER"
echo "============================================================"
@@ -178,7 +179,6 @@ else
exit 1
fi
git checkout -b apache-geode-${VERSION}
- GEODE_SHA=$(awk '{print $1}' <
$WORKSPACE/dist/release/geode/${VERSION}/apache-geode-${VERSION}.tgz.sha256)
set +x
sed -e 's# *url ".*# url
"https://www.apache.org/dyn/closer.lua?path=geode/'"${VERSION}"'/apache-geode-'"${VERSION}"'.tgz"#'
\
-e '/ *mirror ".*www.*/d' \
@@ -412,7 +412,7 @@ else
#after:
# '1.9.0',
# '1.9.1',
- sed -e "s/'${PREV}',/'${PREV}',\\
+ sed -e "s/'${PREV}'/'${PREV}',\\
'${VERSION}'/" \
-i.bak settings.gradle
fi
@@ -467,15 +467,18 @@ RELEASES_TO_KEEP=3
set +x
ls | awk -F. '/KEYS/{next}{print 1000000*$1+1000*$2+$3,$1"."$2"."$3}'| sort -n
| awk '{mm=$2;sub(/\.[^.]*$/,"",mm);V[mm]=$2}END{for(v in V){print V[v]}}'|tail
-$RELEASES_TO_KEEP > ../keep
echo Keeping releases: $(cat ../keep)
+rm -f ../did.remove
(ls | grep -v KEYS; cat ../keep ../keep)|sort|uniq -u|while read oldVersion; do
set -x
svn rm $oldVersion
svn commit -m "remove $oldVersion from mirrors (it is still available at
http://archive.apache.org/dist/geode)"
set +x
- [ -z "$DID_REMOVE" ] || DID_REMOVE="${DID_REMOVE} and "
- DID_REMOVE="${DID_REMOVE}${oldVersion}"
+ [ ! -r ../did.remove ] || echo -n " and " >> ../did.remove
+ echo -n $oldVersion >> ../did.remove
done
-rm ../keep
+touch ../did.remove
+DID_REMOVE=$(cat ../did.remove)
+rm ../keep ../did.remove
echo ""
@@ -485,13 +488,14 @@ echo
"============================================================"
cd ${GEODE}/../..
echo "Next steps:"
echo "1. Click 'Release' in http://repository.apache.org/ (if you haven't
already)"
-echo "2. Go to
https://github.com/${GITHUB_USER}/homebrew-core/pull/new/apache-geode-${VERSION}
and submit the pull request"
+[ -n "$LATER" ] || echo "2. Go to
https://github.com/${GITHUB_USER}/homebrew-core/pull/new/apache-geode-${VERSION}
and submit the pull request"
echo "3. Go to
https://github.com/${GITHUB_USER}/geode/pull/new/add-${VERSION}-to-old-versions
and create the pull request"
-echo "4. Validate docker image: docker run -it apachegeode/geode"
+[ -n "$LATER" ] && tag=":${VERSION}" || tag=""
+echo "4. Validate docker image: docker run -it apachegeode/geode${tag}"
echo "5. Bulk-transition JIRA issues fixed in this release to Closed"
echo "5b.Publish to GitHub (see
https://cwiki.apache.org/confluence/display/GEODE/Releasing+Apache+Geode#ReleasingApacheGeode-PublishtoGitHub)"
-echo "6. Wait overnight for apache mirror sites to sync"
-echo "7. Confirm that your homebrew PR passed its PR checks and was merged to
master"
+echo "6. Wait overnight for apache mirror sites and mavencentral to sync"
+[ -n "$LATER" ] || echo "7. Confirm that your homebrew PR passed its PR checks
and was merged to master"
echo "8. Check that ${VERSION} documentation has been published to
https://geode.apache.org/docs/"
[ -z "$DID_REMOVE" ] || DID_REMOVE=" and ${DID_REMOVE} info has been removed"
echo "9. Check that ${VERSION} download info has been published to
https://geode.apache.org/releases/${DID_REMOVE}"
@@ -499,9 +503,10 @@ MAJOR="${VERSION_MM%.*}"
MINOR="${VERSION_MM#*.}"
PATCH="${VERSION##*.}"
[ "${PATCH}" -ne 0 ] || echo "10. Ask on the dev list for a volunteer to begin
the chore of updating 3rd-party dependency versions on develop (see
dev-tools/dependencies/README.md)"
-M=$(date --date '+9 months' '+%a, %B %d %Y' 2>/dev/null || date -v +9m "+%a,
%B %d %Y" 2>/dev/null || echo "9 months from now")
+M=$(date --date '+18 months' '+%a, %B %d %Y' 2>/dev/null || date -v +9m "+%a,
%B %d %Y" 2>/dev/null || echo "18 months from now")
[ "${PATCH}" -ne 0 ] || echo "11. Mark your calendar for $M (assuming we
release Geode ${MAJOR}.$((MINOR + 3)) on that day) to run
${0%/*}/end_of_support.sh -v ${VERSION_MM}"
-[ "${PATCH}" -ne 0 ] || echo "12. Log in to
https://hub.docker.com/repository/docker/apachegeode/geode and update the
latest Dockerfile linktext and url to ${VERSION_MM}"
+[ "${PATCH}" -ne 0 ] || [ -n "$LATER" ] || echo "12. Log in to
https://hub.docker.com/repository/docker/apachegeode/geode and update the
latest Dockerfile linktext and url to ${VERSION_MM}"
+[ -z "$LATER" ] || echo "Manually add '${VERSION}' to settings.gradle in all
later support branches"
echo "Bump support pipeline to ${VERSION_MM}.$(( PATCH + 1 )) by plussing
BumpPatch in
https://concourse.apachegeode-ci.info/teams/main/pipelines/apache-support-${VERSION_MM//./-}-main?group=Semver%20Management"
echo "Run ${0%/*}/set_versions.sh -v ${VERSION_MM}.$(( PATCH + 1 )) -s"
echo 'Finally, send announce email!'
diff --git a/dev-tools/release/set_copyright.sh
b/dev-tools/release/set_copyright.sh
index db52a24..c480ea7 100755
--- a/dev-tools/release/set_copyright.sh
+++ b/dev-tools/release/set_copyright.sh
@@ -42,13 +42,15 @@ set -x
year=$(date +%Y)
for DIR in $@ ; do
cd ${DIR}
- sed \
- -e "2s/ \(20[0-9][0-9]\) / \1-${year} /" \
- -e "2s/-20[0-9][0-9] /-${year} /" \
- -e "2s/${year}-${year}/${year}/" \
- -i.bak NOTICE
- rm -f NOTICE.bak
- git add NOTICE
+ git grep -l '^Copyright.*Apache' | grep NOTICE | while read NOTICE ; do
+ sed \
+ -e "2s/ \(20[0-9][0-9]\) / \1-${year} /" \
+ -e "2s/-20[0-9][0-9] /-${year} /" \
+ -e "2s/${year}-${year}/${year}/" \
+ -i.bak $NOTICE
+ rm -f $NOTICE.bak
+ git add $NOTICE
+ done
if [ $(git diff --staged | wc -l) -gt 0 ] ; then
git diff --staged --color | cat
git commit -a -m "Bumping copyright year to ${year}"
diff --git a/dev-tools/release/set_versions.sh
b/dev-tools/release/set_versions.sh
index 52991c7..1dce87b 100755
--- a/dev-tools/release/set_versions.sh
+++ b/dev-tools/release/set_versions.sh
@@ -137,7 +137,7 @@ set -x
git add gradle.properties geode-book/config.yml
if [ $(git diff --staged | wc -l) -gt 0 ] ; then
git diff --staged --color | cat
- git commit -m "Bumping version to ${VERSION}${BUILDSUFFIX}"
+ git commit -m "Bumping version to ${VERSION}"
[ "$NOPUSH" = "true" ] || git push -u origin
fi
set +x
@@ -163,7 +163,7 @@ set -x
git add .
if [ $(git diff --staged | wc -l) -gt 0 ] ; then
git diff --staged --color | cat
- git commit -m "Bumping version to ${VERSION}${BUILDSUFFIX}"
+ git commit -m "Bumping version to ${VERSION}"
[ "$NOPUSH" = "true" ] || git push -u origin
fi
set +x