Skip to content

Commit

Permalink
Update the tooling for 3.0
Browse files Browse the repository at this point in the history
Signed-off-by: Luke Shumaker <lukeshu@datawire.io>
Signed-off-by: Sirish Bathina <sirish@kasten.io>
  • Loading branch information
LukeShu authored and bathina2 committed Jul 1, 2022
1 parent 07f4cd2 commit b58958b
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ ifneq ($(MAKECMDGOALS),$(OSS_HOME)/build-aux/go-version.txt)
endif

VERSION := $(or $(VERSION),$(shell go run ./tools/src/goversion))
$(if $(filter v2.%,$(VERSION)),\
,$(error VERSION variable is invalid: It must be a v2.* string, but is '$(VERSION)'))
$(if $(filter v3.%,$(VERSION)),\
,$(error VERSION variable is invalid: It must be a v3.* string, but is '$(VERSION)'))
$(if $(findstring +,$(VERSION)),\
$(error VERSION variable is invalid: It must not contain + characters, but is '$(VERSION)'),)
export VERSION

CHART_VERSION := $(or $(CHART_VERSION),$(shell go run ./tools/src/goversion --dir-prefix=chart))
$(if $(filter v7.%,$(CHART_VERSION)),\
,$(error CHART_VERSION variable is invalid: It must be a v7.* string, but is '$(CHART_VERSION)'))
$(if $(filter v8.%,$(CHART_VERSION)),\
,$(error CHART_VERSION variable is invalid: It must be a v8.* string, but is '$(CHART_VERSION)'))
export CHART_VERSION

$(info [make] VERSION=$(VERSION))
Expand Down
2 changes: 1 addition & 1 deletion docs/publish_yaml_s3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ errusage() {
[[ -d "$1" ]] || errusage 'DIR is not a directory: %q' "$dir"
[[ -n "$AWS_ACCESS_KEY_ID" ]] || errusage "AWS_ACCESS_KEY_ID is not set"
[[ -n "$AWS_SECRET_ACCESS_KEY" ]] || errusage "AWS_SECRET_ACCESS_KEY is not set"
[[ "${VERSION:-}" == v2.* ]] || errusage "VERSION must be set to a 'v2.*' string"
[[ "${VERSION:-}" == v3.* ]] || errusage "VERSION must be set to a 'v3.*' string"
dir=$1
while [[ "$dir" == */ ]]; do
dir=${dir%/}
Expand Down
2 changes: 1 addition & 1 deletion manifests/push_manifests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ errusage() {
[[ -d "$1" ]] || errusage 'DIR is not a directory: %q' "$dir"
[[ -n "$AWS_ACCESS_KEY_ID" ]] || errusage "AWS_ACCESS_KEY_ID is not set"
[[ -n "$AWS_SECRET_ACCESS_KEY" ]] || errusage "AWS_SECRET_ACCESS_KEY is not set"
[[ "${VERSION:-}" == v2.* ]] || errusage "VERSION must be set to a 'v2.*' string"
[[ "${VERSION:-}" == v3.* ]] || errusage "VERSION must be set to a 'v3.*' string"
dir=$1
while [[ "$dir" == */ ]]; do
dir=${dir%/}
Expand Down
2 changes: 1 addition & 1 deletion releng/chart-create-gh-release
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ from lib.uiutil import run, run_txtcapture
def main() -> int:
chart_version = getenv("CHART_VERSION")
if not (chart_version and chart_version.startswith("v") and re_ga.match(chart_version[1:])):
sys.stderr.write(f'Usage: CHART_VERSION=v7.Y.Z {os.path.basename(sys.argv[0])}\n')
sys.stderr.write(f'Usage: CHART_VERSION=v8.Y.Z {os.path.basename(sys.argv[0])}\n')
return 2

content_gittag = f"chart/{chart_version}"
Expand Down
2 changes: 1 addition & 1 deletion tools/src/devversion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ main() {
printf '%s\n' "$vsemver"
return 0
fi
done < <("${0%/*}"/goversion --all | grep '^v2\.')
done < <("${0%/*}"/goversion --all | grep '^v3\.')
msg 'backing off for %ds then retrying...' "$backoff_secs"
sleep "$backoff_secs"
done
Expand Down

0 comments on commit b58958b

Please sign in to comment.