From c7f2bc8717282f418f8bf809139c4a4f1053f693 Mon Sep 17 00:00:00 2001 From: Cam Hutchison Date: Sat, 16 Nov 2024 22:43:30 +1100 Subject: [PATCH 1/2] build: Fix "make create-github-release" Fix the `create-github-release` make target to use "go run" to run the tool that creates the github release. This used to run a tool in this repository that was pre-built, so the "go run" was not needed before. Now the tool has moved to a separate repository, this is required. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index e39a74202c25e..c7d3a2ea7fcd6 100644 --- a/Makefile +++ b/Makefile @@ -1655,7 +1655,7 @@ 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 = github.com/gravitational/shared-workflows/tools/release-notes@latest +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 = "" From ae36be8daa1e70bc3013fc92e8fb5809e15b070c Mon Sep 17 00:00:00 2001 From: Cam Hutchison Date: Mon, 18 Nov 2024 12:24:53 +1100 Subject: [PATCH 2/2] 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 c7d3a2ea7fcd6..578bab0d20fa1 100644 --- a/Makefile +++ b/Makefile @@ -1638,10 +1638,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. @@ -1655,12 +1655,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 \