diff --git a/packages/packages.yaml.tmpl b/packages/packages.yaml.tmpl index 0416a8a7..8289382b 100644 --- a/packages/packages.yaml.tmpl +++ b/packages/packages.yaml.tmpl @@ -151,8 +151,8 @@ components: profile: [release] steps: release: - - script: |- - export TARGET={{ .Git.ref }} + - script: |- + export TARGET={{ if strings.HasPrefix "v" .Git.ref }}{{ printf "release-%d.%d" (semver.Semver .Git.ref).Major (semver.Semver .Git.ref).Minor }}{{ else }}{{ .Git.ref }}{{ end }} export TARGET_OS={{ .Release.os }} TARGET_ARCH={{ .Release.arch }} make grafana_without_pull make default -C ng-monitoring @@ -188,7 +188,7 @@ components: steps: release: - script: |- - export TARGET={{ .Git.ref }} + export TARGET={{ if strings.HasPrefix "v" .Git.ref }}{{ printf "release-%d.%d" (semver.Semver .Git.ref).Major (semver.Semver .Git.ref).Minor }}{{ else }}{{ .Git.ref }}{{ end }} export TARGET_OS={{ .Release.os }} TARGET_ARCH={{ .Release.arch }} go run ./cmd/monitoring.go --config=monitoring.yaml --tag={{ .Git.ref }} make default -C ng-monitoring @@ -213,7 +213,7 @@ components: steps: release: - script: |- - export TARGET={{ .Git.ref }} + export TARGET={{ if strings.HasPrefix "v" .Git.ref }}{{ printf "release-%d.%d" (semver.Semver .Git.ref).Major (semver.Semver .Git.ref).Minor }}{{ else }}{{ .Git.ref }}{{ end }} export TARGET_OS={{ .Release.os }} TARGET_ARCH={{ .Release.arch }} go run ./cmd/monitoring.go --config=monitoring.yaml --tag={{ .Git.ref }} make output/prometheus