You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by ho...@apache.org on 2021/11/10 21:00:25 UTC

[solr-operator] branch release-0.5 updated: Small fixes for the release wizard.

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

houston pushed a commit to branch release-0.5
in repository https://gitbox.apache.org/repos/asf/solr-operator.git


The following commit(s) were added to refs/heads/release-0.5 by this push:
     new afa369b  Small fixes for the release wizard.
afa369b is described below

commit afa369b1ca34d8821dbc0f9f8e88b103f62dac09
Author: Houston Putman <ho...@apache.org>
AuthorDate: Wed Nov 10 15:59:28 2021 -0500

    Small fixes for the release wizard.
---
 hack/release/version/change_suffix.sh     |  4 ++--
 hack/release/version/propagate_version.sh |  4 ++--
 hack/release/version/update_version.sh    |  2 +-
 hack/release/wizard/releaseWizard.yaml    | 10 ++++++++--
 4 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/hack/release/version/change_suffix.sh b/hack/release/version/change_suffix.sh
index 2601d5f..215c745 100755
--- a/hack/release/version/change_suffix.sh
+++ b/hack/release/version/change_suffix.sh
@@ -51,7 +51,7 @@ done
 shift "$((OPTIND-1))"   # Discard the options and sentinel --
 
 if [[ -z "${VERSION_SUFFIX:-}" ]]; then
-  EXISTING_VERSION_SUFFIX="$(cat version/version.go | grep -E 'VersionSuffix([[:space:]]+)string' | grep -o '["''].*["'']' | xargs)"
+  EXISTING_VERSION_SUFFIX="$(cat version/version.go | grep -E 'VersionSuffix([[:space:]]+)=' | grep -o '["''].*["'']' | xargs)"
   if [[ -z "${EXISTING_VERSION_SUFFIX}" ]]; then
     export VERSION_SUFFIX="prerelease"
   else
@@ -62,6 +62,6 @@ fi
 echo "Updating the version suffix for the project to: ${VERSION_SUFFIX}"
 
 # Version file
-awk '$1 == "VersionSuffix"{$4 = "\"'"${VERSION_SUFFIX}"'\""} 1' version/version.go > version/version.tmp.go
+awk '$1 == "VersionSuffix"{$3 = "\"'"${VERSION_SUFFIX}"'\""} 1' version/version.go > version/version.tmp.go
 go fmt version/version.tmp.go
 mv version/version.tmp.go version/version.go
diff --git a/hack/release/version/propagate_version.sh b/hack/release/version/propagate_version.sh
index 44ee279..7697f63 100755
--- a/hack/release/version/propagate_version.sh
+++ b/hack/release/version/propagate_version.sh
@@ -47,8 +47,8 @@ done
 shift "$((OPTIND-1))"   # Discard the options and sentinel --
 
 # Get full version string
-VERSION="$(cat version/version.go | grep -E 'Version([[:space:]]+)string' | grep -o '["''].*["'']' | xargs)"
-VERSION_SUFFIX="$(cat version/version.go | grep -E 'VersionSuffix([[:space:]]+)string' | grep -o '["''].*["'']' | xargs)"
+VERSION="$(cat version/version.go | grep -E 'Version([[:space:]]+)=' | grep -o '["''].*["'']' | xargs)"
+VERSION_SUFFIX="$(cat version/version.go | grep -E 'VersionSuffix([[:space:]]+)=' | grep -o '["''].*["'']' | xargs)"
 if [[ -n "${VERSION_SUFFIX:-}" ]]; then
   VERSION="${VERSION}-${VERSION_SUFFIX}"
 fi
diff --git a/hack/release/version/update_version.sh b/hack/release/version/update_version.sh
index a110c59..2e93cc3 100755
--- a/hack/release/version/update_version.sh
+++ b/hack/release/version/update_version.sh
@@ -56,6 +56,6 @@ fi
 echo "Updating the latest version throughout the repo to: ${VERSION}"
 
 # Version file
-awk '$1 == "Version"{$4 = "\"'"${VERSION}"'\""} 1' version/version.go > version/version.tmp.go
+awk '$1 == "Version"{$3 = "\"'"${VERSION}"'\""} 1' version/version.go > version/version.tmp.go
 go fmt version/version.tmp.go
 mv version/version.tmp.go version/version.go
diff --git a/hack/release/wizard/releaseWizard.yaml b/hack/release/wizard/releaseWizard.yaml
index 8429414..f0a5b76 100644
--- a/hack/release/wizard/releaseWizard.yaml
+++ b/hack/release/wizard/releaseWizard.yaml
@@ -441,7 +441,10 @@ groups:
         cmd: git checkout main
         tee: true
       - !Command
-        cmd: ./hack/release/version/remove_version_specific_info.sh -v {{ next_version }}
+        cmd: git pull --ff-only
+        tee: true
+      - !Command
+        cmd: ./hack/release/version/remove_version_specific_info.sh
         tee: true
       - !Command
         cmd: ./hack/release/version/update_version.sh -v {{ next_version }}
@@ -470,7 +473,10 @@ groups:
         cmd: git checkout {{ stable_branch }}
         tee: true
       - !Command
-        cmd: ./hack/release/version/remove_version_specific_info.sh -v {{ next_version }}
+        cmd: git pull --ff-only
+        tee: true
+      - !Command
+        cmd: ./hack/release/version/remove_version_specific_info.sh
         tee: true
       - !Command
         cmd: ./hack/release/version/update_version.sh -v {{ next_version }}