From af92f206330ca320f51f2be31c18014528ed877e Mon Sep 17 00:00:00 2001 From: Timothy Messier Date: Wed, 2 Aug 2023 17:27:47 +0000 Subject: [PATCH] chore: Use version/VERSION as single source of version number This updates the version make target to use the version/VERSION file in the same manner as the build system. This ensures that the VERSION file is the single source of truth for the version number. --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index f2a060b9d..8f6af94a3 100644 --- a/Makefile +++ b/Makefile @@ -381,7 +381,10 @@ docker-build-dev: build .PHONY: version # This is used for release builds by .github/workflows/build.yml version: - @go run ./cmd/boundary version | awk '/Version Number:/ { print $$3 }' + @go run \ + -ldflags "-X 'github.com/hashicorp/boundary/version.Version=$(shell cat version/VERSION)'" \ + ./cmd/boundary version \ + | awk '/Version Number:/ { print $$3 }' EDITION?= .PHONY: edition