From 8f292958a6c28ab4e6f66cf2fe812023baf79103 Mon Sep 17 00:00:00 2001 From: Alex Goodman Date: Wed, 9 Feb 2022 08:25:31 -0500 Subject: [PATCH] set version makefile var for updating version file (#808) Signed-off-by: Alex Goodman --- Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Makefile b/Makefile index 4666a4371..b77d87f87 100644 --- a/Makefile +++ b/Makefile @@ -6,6 +6,7 @@ COVER_TOTAL = $(RESULTSDIR)/unit-coverage-summary.txt LINTCMD = $(TEMPDIR)/golangci-lint run --tests=false --timeout=2m --config .golangci.yaml RELEASE_CMD=$(TEMPDIR)/goreleaser release --rm-dist SNAPSHOT_CMD=$(RELEASE_CMD) --skip-publish --snapshot +VERSION=$(shell git describe --dirty --always --tags) COMPARE_TEST_IMAGE = centos:8.2.2004 COMPARE_DIR = ./test/compare @@ -55,6 +56,10 @@ ifndef SNAPSHOTDIR $(error SNAPSHOTDIR is not set) endif +ifndef VERSION + $(error VERSION is not set) +endif + ifndef REF_NAME REF_NAME = $(VERSION) endif @@ -326,6 +331,7 @@ release: clean-dist CHANGELOG.md ## Build and publish final binaries and packag cat .github/scripts/apple-signing/log/*.txt + # TODO: turn this into a post-release hook # upload the version file that supports the application version update check (excluding pre-releases) .github/scripts/update-version-file.sh "$(DISTDIR)" "$(VERSION)"