From e88c819356c13c8a97555238903a8e7de40b57fe Mon Sep 17 00:00:00 2001 From: Miguel Sanchez Gonzalez Date: Wed, 11 Mar 2026 19:15:55 +0100 Subject: [PATCH 1/3] fix: use GORELEASER_CURRENT_TAG for RC release detection Co-Authored-By: Claude Opus 4.6 --- Makefile | 3 ++- cloudsmith.sh | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 5ec1ba1f..971a02d2 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,8 @@ else GORELEASER_ID = $(FLAVOR) endif -VERSION := $(shell git describe --always) +# Use GORELEASER_CURRENT_TAG if set (from GitHub Actions), otherwise derive from git +VERSION ?= $(or $(GORELEASER_CURRENT_TAG),$(shell git describe --tags --always 2>/dev/null || echo "0.0.0-dev")) # Tooling versions GORELEASER_VERSION=v2.12.0 diff --git a/cloudsmith.sh b/cloudsmith.sh index b93c531f..85c81488 100644 --- a/cloudsmith.sh +++ b/cloudsmith.sh @@ -1,3 +1,6 @@ +#!/usr/bin/env bash +set -euo pipefail + # Upload Platform.sh packages cloudsmith push deb platformsh/cli/any-distro/any-version dist/platformsh-cli_${VERSION}_linux_arm64.deb cloudsmith push deb platformsh/cli/any-distro/any-version dist/platformsh-cli_${VERSION}_linux_amd64.deb From ff34d5a252da1f6db1bbc41d3e7a22926b0db138 Mon Sep 17 00:00:00 2001 From: Patrick Dawkins Date: Thu, 12 Mar 2026 14:39:54 +0000 Subject: [PATCH 2/3] Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 971a02d2..e05d2f7f 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,9 @@ else endif # Use GORELEASER_CURRENT_TAG if set (from GitHub Actions), otherwise derive from git -VERSION ?= $(or $(GORELEASER_CURRENT_TAG),$(shell git describe --tags --always 2>/dev/null || echo "0.0.0-dev")) +ifeq ($(origin VERSION), undefined) +VERSION := $(or $(GORELEASER_CURRENT_TAG),$(shell git describe --tags --always 2>/dev/null || echo "0.0.0-dev")) +endif # Tooling versions GORELEASER_VERSION=v2.12.0 From fb0a7204062f45645a2ac9bd8c2f4b22ce96af8d Mon Sep 17 00:00:00 2001 From: miguelsanchez-upsun Date: Thu, 12 Mar 2026 15:41:47 +0100 Subject: [PATCH 3/3] Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- cloudsmith.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cloudsmith.sh b/cloudsmith.sh index 85c81488..9fb4ae74 100644 --- a/cloudsmith.sh +++ b/cloudsmith.sh @@ -1,6 +1,10 @@ #!/usr/bin/env bash set -euo pipefail +if [[ -z "${VERSION:-}" ]]; then + echo "Error: VERSION environment variable is not set. Please set VERSION (e.g., '1.2.3') before running cloudsmith.sh." >&2 + exit 1 +fi # Upload Platform.sh packages cloudsmith push deb platformsh/cli/any-distro/any-version dist/platformsh-cli_${VERSION}_linux_arm64.deb cloudsmith push deb platformsh/cli/any-distro/any-version dist/platformsh-cli_${VERSION}_linux_amd64.deb