File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5151shift " $(( OPTIND- 1 )) " # Discard the options and sentinel --
5252
5353if [[ -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
6262echo " 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
6666go fmt version/version.tmp.go
6767mv version/version.tmp.go version/version.go
Original file line number Diff line number Diff line change 4747shift " $(( 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) "
5252if [[ -n " ${VERSION_SUFFIX:- } " ]]; then
5353 VERSION=" ${VERSION} -${VERSION_SUFFIX} "
5454fi
Original file line number Diff line number Diff line change 5656echo " 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
6060go fmt version/version.tmp.go
6161mv version/version.tmp.go version/version.go
Original file line number Diff line number Diff 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 }}
You can’t perform that action at this time.
0 commit comments