Lines Matching +full:go +full:- +full:version
2 # Copyright 2019 The Go Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style
6 cd "$(git rev-parse --show-toplevel)"
8 read -p "What is the next release version (e.g., 'v1.26.0')? " VERSION
9 SEMVER_REGEX='^v\([0-9]*\)[.]\([0-9]*\)[.]\([0-9]*\)\([.a-zA-Z0-9A-Z-]*\)$'
10 if ! [[ -z $(echo $VERSION | sed -e "s/$SEMVER_REGEX//") ]]; then
13 VERSION_MAJOR=$(echo $VERSION | sed -e "s/$SEMVER_REGEX/\1/")
14 VERSION_MINOR=$(echo $VERSION | sed -e "s/$SEMVER_REGEX/\2/")
15 VERSION_PATCH=$(echo $VERSION | sed -e "s/$SEMVER_REGEX/\3/")
16 VERSION_PRERELEASE=$(echo $VERSION | sed -e "s/$SEMVER_REGEX/\4/")
18 echo; echo "invalid: major version must be 1"; exit 1
20 if ! [[ -z $VERSION_PRERELEASE ]] && ! [[ "$VERSION_PRERELEASE" =~ ^-rc[.][0-9]+$ ]]; then
21 echo; echo "invalid: pre-release suffix must be empty or '-rc.X'"; exit 1
23 VERSION_PRERELEASE=${VERSION_PRERELEASE#"-"} # trim possible leading dash
27 if ! [[ -z $VERSION_PRERELEASE ]]; then
28 VERSION_STRING="${VERSION_STRING}-${VERSION_PRERELEASE}"
33 read -p "Were there any changes to the generator that relies on new runtime functionality? " YN
36 read -p " What minor version of the runtime is required now? " GEN_VERSION
37 if ! [[ "$GEN_VERSION" =~ ^[0-9]+$ ]]; then echo; echo "invalid: must be an integer"; exit 1; fi;;
42 read -p "Were there any dropped functionality in the runtime for old generated code? " YN
45 read -p " What minor version of the runtime is required now? " MIN_VERSION
46 if ! [[ "$MIN_VERSION" =~ ^[0-9]+$ ]]; then echo; echo "invalid: must be an integer"; exit 1; fi;;
56 set -e
59 if [[ $(git branch --list release) ]]; then
66 INPLACE='-i ""' # BSD version of sed expects argument after -i
67 if [[ "$(sed --version)" == *"GNU"* ]]; then
68 INPLACE="-i" # GNU version of sed does not expect argument after -i
70 sed $INPLACE -e "s/\(Minor *= *\)[0-9]*/\1$VERSION_MINOR/" internal/version/version.go
71 sed $INPLACE -e "s/\(Patch *= *\)[0-9]*/\1$VERSION_PATCH/" internal/version/version.go
72 sed $INPLACE -e "s/\(PreRelease *= *\)\"[^\"]*\"/\1\"$VERSION_PRERELEASE\"/" internal/version/versi…
73 if ! [[ -z $GEN_VERSION ]]; then
74 sed $INPLACE -e "s/\(GenVersion *= *\)[0-9]*/\1$GEN_VERSION/" runtime/protoimpl/version.go
76 if ! [[ -z $MIN_VERSION ]]; then
77 sed $INPLACE -e "s/\(MinVersion *= *\)[0-9]*/\1$MIN_VERSION/" runtime/protoimpl/version.go
79 git commit -a -m "all: release $(version_string)"
82 go test -mod=vendor -timeout=60m -count=1 integration_test.go "$@" -buildRelease
87 sed $INPLACE -e "s/\(PreRelease *= *\)\"[^\"]*\"/\1\"$VERSION_PRERELEASE\"/" internal/version/versi…
88 git commit -a -m "all: start $(version_string)"
97 echo " b. Attach pre-compiled binaries as assets to the release."