Skip to content

Commit afa369b

Browse files
committed
Small fixes for the release wizard.
1 parent f628dc7 commit afa369b

4 files changed

Lines changed: 13 additions & 7 deletions

File tree

hack/release/version/change_suffix.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ done
5151
shift "$((OPTIND-1))" # Discard the options and sentinel --
5252

5353
if [[ -z "${VERSION_SUFFIX:-}" ]]; then
54-
EXISTING_VERSION_SUFFIX="$(cat version/version.go | grep -E 'VersionSuffix([[:space:]]+)string' | grep -o '["''].*["'']' | xargs)"
54+
EXISTING_VERSION_SUFFIX="$(cat version/version.go | grep -E 'VersionSuffix([[:space:]]+)=' | grep -o '["''].*["'']' | xargs)"
5555
if [[ -z "${EXISTING_VERSION_SUFFIX}" ]]; then
5656
export VERSION_SUFFIX="prerelease"
5757
else
@@ -62,6 +62,6 @@ fi
6262
echo "Updating the version suffix for the project to: ${VERSION_SUFFIX}"
6363

6464
# Version file
65-
awk '$1 == "VersionSuffix"{$4 = "\"'"${VERSION_SUFFIX}"'\""} 1' version/version.go > version/version.tmp.go
65+
awk '$1 == "VersionSuffix"{$3 = "\"'"${VERSION_SUFFIX}"'\""} 1' version/version.go > version/version.tmp.go
6666
go fmt version/version.tmp.go
6767
mv version/version.tmp.go version/version.go

hack/release/version/propagate_version.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ done
4747
shift "$((OPTIND-1))" # Discard the options and sentinel --
4848

4949
# Get full version string
50-
VERSION="$(cat version/version.go | grep -E 'Version([[:space:]]+)string' | grep -o '["''].*["'']' | xargs)"
51-
VERSION_SUFFIX="$(cat version/version.go | grep -E 'VersionSuffix([[:space:]]+)string' | grep -o '["''].*["'']' | xargs)"
50+
VERSION="$(cat version/version.go | grep -E 'Version([[:space:]]+)=' | grep -o '["''].*["'']' | xargs)"
51+
VERSION_SUFFIX="$(cat version/version.go | grep -E 'VersionSuffix([[:space:]]+)=' | grep -o '["''].*["'']' | xargs)"
5252
if [[ -n "${VERSION_SUFFIX:-}" ]]; then
5353
VERSION="${VERSION}-${VERSION_SUFFIX}"
5454
fi

hack/release/version/update_version.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,6 @@ fi
5656
echo "Updating the latest version throughout the repo to: ${VERSION}"
5757

5858
# Version file
59-
awk '$1 == "Version"{$4 = "\"'"${VERSION}"'\""} 1' version/version.go > version/version.tmp.go
59+
awk '$1 == "Version"{$3 = "\"'"${VERSION}"'\""} 1' version/version.go > version/version.tmp.go
6060
go fmt version/version.tmp.go
6161
mv version/version.tmp.go version/version.go

hack/release/wizard/releaseWizard.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,10 @@ groups:
441441
cmd: git checkout main
442442
tee: true
443443
- !Command
444-
cmd: ./hack/release/version/remove_version_specific_info.sh -v {{ next_version }}
444+
cmd: git pull --ff-only
445+
tee: true
446+
- !Command
447+
cmd: ./hack/release/version/remove_version_specific_info.sh
445448
tee: true
446449
- !Command
447450
cmd: ./hack/release/version/update_version.sh -v {{ next_version }}
@@ -470,7 +473,10 @@ groups:
470473
cmd: git checkout {{ stable_branch }}
471474
tee: true
472475
- !Command
473-
cmd: ./hack/release/version/remove_version_specific_info.sh -v {{ next_version }}
476+
cmd: git pull --ff-only
477+
tee: true
478+
- !Command
479+
cmd: ./hack/release/version/remove_version_specific_info.sh
474480
tee: true
475481
- !Command
476482
cmd: ./hack/release/version/update_version.sh -v {{ next_version }}

0 commit comments

Comments
 (0)