diff --git a/.github/workflows/dev-release.yml b/.github/workflows/dev-release.yml index fd7a16dcc..51f2eb636 100644 --- a/.github/workflows/dev-release.yml +++ b/.github/workflows/dev-release.yml @@ -86,7 +86,8 @@ jobs: working-directory: spinifex run: | set -euo pipefail - TAG="$(git describe --tags --always)-dev" + # Describing against a dev tag would nest it, growing the name every release. + TAG="$(git describe --tags --always --exclude '*-dev')-dev" case "$TAG" in v*) ;; *) echo "::error::git describe gave '$TAG', which is not a v-prefixed version"; exit 1 ;; diff --git a/.github/workflows/e2e-baremetal.yml b/.github/workflows/e2e-baremetal.yml index f4280bfbb..36925c480 100644 --- a/.github/workflows/e2e-baremetal.yml +++ b/.github/workflows/e2e-baremetal.yml @@ -123,7 +123,7 @@ jobs: INSTALLER_BIN="${RUNNER_TEMP}/bm-bins/spinifex-installer" \ SPINIFEX_SRC="${GITHUB_WORKSPACE}" \ VIPERBLOCK_SRC="${RUNNER_TEMP}/bm-bins/viperblock" \ - VERSION="$(cd "$GITHUB_WORKSPACE" && git describe --tags --always 2>/dev/null || echo dev)" + VERSION="$(cd "$GITHUB_WORKSPACE" && git describe --tags --always --exclude '*-dev' 2>/dev/null || echo dev)" - name: Write ePDU credentials run: | diff --git a/Makefile b/Makefile index a68316f56..957e66464 100644 --- a/Makefile +++ b/Makefile @@ -57,7 +57,7 @@ build-ui: cd spinifex/services/spinifexui/frontend && pnpm build # GO commands -VERSION ?= $(shell git describe --tags --always --dirty) +VERSION ?= $(shell git describe --tags --always --dirty --exclude '*-dev') COMMIT ?= $(shell git rev-parse --short HEAD) LDFLAGS := -s -w -X github.com/mulgadc/spinifex/cmd/spinifex/cmd.Version=$(VERSION) -X github.com/mulgadc/spinifex/cmd/spinifex/cmd.Commit=$(COMMIT)