Skip to content

Commit 09c6a9c

Browse files
committed
fix: ignore module tags
Modifes the `Makefile` to ignore the module-specific tags we create during the release. `goreleaser` has limited capabilities to filter tags in the free version. Instead, we're able to set the current tag explicitly via the `GORELEASER_CURRENT_TAG` environment variable. We don't need to do this in the release job in CircleCI because it checks out a specific tag and it doesn't fetch all other tags. So, it only has the tag that we want.
1 parent c00bd25 commit 09c6a9c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ include tools.mk
44
DEBUG ?= 0
55
LOG_LEVEL ?= info
66
CONTROL_PLANE_IMAGE_REPO ?= host.docker.internal:5000/control-plane
7-
CONTROL_PLANE_VERSION ?= $(shell git describe --tags --abbrev=0)
7+
CONTROL_PLANE_VERSION ?= $(shell git describe --tags --abbrev=0 --match 'v*')
88
PGEDGE_IMAGE_REPO ?= host.docker.internal:5000/pgedge
99
PACKAGE_REPO_BASE_URL ?= http://pgedge-529820047909-yum.s3-website.us-east-2.amazonaws.com
1010
PACKAGE_RELEASE_CHANNEL ?= dev
@@ -102,6 +102,7 @@ control-plane-images:
102102

103103
.PHONY: goreleaser-build
104104
goreleaser-build:
105+
GORELEASER_CURRENT_TAG=$(CONTROL_PLANE_VERSION) \
105106
goreleaser build --snapshot --clean
106107
tar -C dist --strip-components=1 -c -z \
107108
-f dist/control-plane_$(CONTROL_PLANE_VERSION:v%=%)_linux_amd64.tar.gz \
@@ -110,6 +111,10 @@ goreleaser-build:
110111
-f dist/control-plane_$(CONTROL_PLANE_VERSION:v%=%)_linux_arm64.tar.gz \
111112
control-plane_linux_arm64_v8.0
112113

114+
goreleaser-test-publish:
115+
GORELEASER_CURRENT_TAG=$(CONTROL_PLANE_VERSION) \
116+
goreleaser release --skip=publish --snapshot --clean
117+
113118
###########
114119
# release #
115120
###########

0 commit comments

Comments
 (0)