From bdb0ef6d7e6805ad416b49eaa63af05664824781 Mon Sep 17 00:00:00 2001 From: Cam Hutchison Date: Mon, 18 Nov 2024 12:24:53 +1100 Subject: [PATCH] build: Remove single-use vars for simplicity Remove the `CHANGELOG` and `RELEASE_NOTES_GEN` vars that contained the name of a Go main package to run in favor of a straightforward "go run" command. --- Makefile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index de2948218c758..2b40088d21cec 100644 --- a/Makefile +++ b/Makefile @@ -1809,10 +1809,10 @@ rustup-install-target-toolchain: rustup-set-version # usage: BASE_BRANCH=branch/v13 BASE_TAG=v13.2.0 make changelog # # BASE_BRANCH and BASE_TAG will be automatically determined if not specified. -CHANGELOG = github.com/gravitational/shared-workflows/tools/changelog@latest .PHONY: changelog changelog: - @go run $(CHANGELOG) --base-branch="$(BASE_BRANCH)" --base-tag="$(BASE_TAG)" ./ + @go run github.com/gravitational/shared-workflows/tools/changelog@latest \ + --base-branch="$(BASE_BRANCH)" --base-tag="$(BASE_TAG)" ./ # create-github-release will generate release notes from the CHANGELOG.md and will # create release notes from them. @@ -1826,12 +1826,14 @@ changelog: # # For more information on release notes generation see: # https://github.com/gravitational/shared-workflows/tree/gus/release-notes/tools/release-notes#readme -RELEASE_NOTES_GEN = go run github.com/gravitational/shared-workflows/tools/release-notes@latest .PHONY: create-github-release create-github-release: LATEST = false create-github-release: GITHUB_RELEASE_LABELS = "" create-github-release: - @NOTES=$$($(RELEASE_NOTES_GEN) --labels=$(GITHUB_RELEASE_LABELS) $(VERSION) CHANGELOG.md) && gh release create v$(VERSION) \ + @NOTES=$$( \ + go run github.com/gravitational/shared-workflows/tools/release-notes@latest \ + --labels=$(GITHUB_RELEASE_LABELS) $(VERSION) CHANGELOG.md \ + ) && gh release create v$(VERSION) \ -t "Teleport $(VERSION)" \ --latest=$(LATEST) \ --verify-tag \