diff --git a/agent/Makefile b/agent/Makefile index a0c2ad9a3b2..267a40d7bfb 100644 --- a/agent/Makefile +++ b/agent/Makefile @@ -128,21 +128,21 @@ package-ee: packaging/LICENSE buildx .PHONY: release release: export GORELEASER_CURRENT_TAG := $(VERSION_TAG) -release: export GORELEASER_PREVIOUS_TAG := $(shell git tag --sort=-creatordate | grep -E '^[0-9.]+$$' | grep "$(VERSION_TAG)" -A1 | sed -n '2 p') +release: export GORELEASER_PREVIOUS_TAG := $(shell git tag --sort=-creatordate | grep -E '^v?[0-9.]+$$' | grep "$(VERSION_TAG)" -A1 | sed -n '2 p') release: packaging/LICENSE buildx goreleaser --rm-dist make publish-nvcr .PHONY: release-dryrun release-dryrun: export GORELEASER_CURRENT_TAG := $(VERSION_TAG) -release-dryrun: export GORELEASER_PREVIOUS_TAG := $(shell git tag --sort=-creatordate | grep -E '^[0-9.]+$$' | grep "$(VERSION_TAG)" -A1 | sed -n '2 p') +release-dryrun: export GORELEASER_PREVIOUS_TAG := $(shell git tag --sort=-creatordate | grep -E '^v?[0-9.]+$$' | grep "$(VERSION_TAG)" -A1 | sed -n '2 p') # We intentionally do not invoke `make publish-nvcr(-dryrun)` here. release-dryrun: packaging/LICENSE buildx goreleaser --rm-dist -f ./.goreleaser_dryrun.yml .PHONY: release-ee release-ee: export GORELEASER_CURRENT_TAG := $(VERSION_TAG)-ee -release-ee: export GORELEASER_PREVIOUS_TAG := $(shell git tag --sort=-creatordate | grep -E '^[0-9.]+-ee$$' | grep "$(VERSION_TAG)-ee" -A1 | sed -n '2 p') +release-ee: export GORELEASER_PREVIOUS_TAG := $(shell git tag --sort=-creatordate | grep -E '^v?[0-9.]+-ee$$' | grep "$(VERSION_TAG)-ee" -A1 | sed -n '2 p') release-ee: packaging/LICENSE buildx goreleaser --rm-dist -f ./.goreleaser_ee.yml diff --git a/helm/Makefile b/helm/Makefile index 87b97a8f44f..c1d5e8fff02 100644 --- a/helm/Makefile +++ b/helm/Makefile @@ -20,7 +20,7 @@ clean: .PHONY: release-gh release-gh: export GORELEASER_CURRENT_TAG := $(VERSION_TAG) -release-gh: export GORELEASER_PREVIOUS_TAG := $(shell git tag --sort=-creatordate | grep -E '^[0-9.]+$$' | grep "$(VERSION_TAG)" -A1 | sed -n '2 p') +release-gh: export GORELEASER_PREVIOUS_TAG := $(shell git tag --sort=-creatordate | grep -E '^v?[0-9.]+$$' | grep "$(VERSION_TAG)" -A1 | sed -n '2 p') release-gh: go install github.com/goreleaser/goreleaser@v1.14.1 git clean -df @@ -31,7 +31,8 @@ release-gh-rc: export GORELEASER_CURRENT_TAG := $(VERSION_TAG) # The following line lists all tags by creation date, finds the current tag and # the next line after, then prints that second line, which should be the most # recent previous tag. This works if the previous tag is both a minor release, -# or an rc release. +# or an rc release. Also, this is a separate make target because it makes it +# easier to compute tag diffs for release notes. release-gh-rc: export GORELEASER_PREVIOUS_TAG := $(shell git tag --sort=-creatordate | grep "$(VERSION_TAG)" -A1 | sed -n '2 p') release-gh-rc: go install github.com/goreleaser/goreleaser@v1.14.1 @@ -40,7 +41,7 @@ release-gh-rc: .PHONY: release-gh-dryrun release-gh-dryrun: export GORELEASER_CURRENT_TAG := $(VERSION_TAG) -release-gh-dryrun: export GORELEASER_PREVIOUS_TAG := $(shell git tag --sort=-creatordate | grep -E '^[0-9.]+$$' | grep "$(VERSION_TAG)" -A1 | sed -n '2 p') +release-gh-dryrun: export GORELEASER_PREVIOUS_TAG := $(shell git tag --sort=-creatordate | grep -E '^v?[0-9.]+$$' | grep "$(VERSION_TAG)" -A1 | sed -n '2 p') release-gh-dryrun: go install github.com/goreleaser/goreleaser@v1.14.1 git clean -df @@ -48,7 +49,7 @@ release-gh-dryrun: .PHONY: release-gh-ee release-gh-ee: export GORELEASER_CURRENT_TAG := $(VERSION_TAG)-ee -release-gh-ee: export GORELEASER_PREVIOUS_TAG := $(shell git tag --sort=-creatordate | grep -E '^[0-9.]+-ee$$' | grep "$(VERSION_TAG)-ee" -A1 | sed -n '2 p') +release-gh-ee: export GORELEASER_PREVIOUS_TAG := $(shell git tag --sort=-creatordate | grep -E '^v?[0-9.]+-ee$$' | grep "$(VERSION_TAG)-ee" -A1 | sed -n '2 p') release-gh-ee: go install github.com/goreleaser/goreleaser@v1.14.1 git clean -df diff --git a/master/Makefile b/master/Makefile index 11616bec416..096575b7f73 100644 --- a/master/Makefile +++ b/master/Makefile @@ -270,7 +270,7 @@ package-small: gen buildx-small release: export DET_SEGMENT_MASTER_KEY ?= release: export DET_SEGMENT_WEBUI_KEY ?= release: export GORELEASER_CURRENT_TAG := $(VERSION_TAG) -release: export GORELEASER_PREVIOUS_TAG := $(shell git tag --sort=-creatordate | grep -E '^[0-9.]+$$' | grep "$(VERSION_TAG)" -A1 | sed -n '2 p') +release: export GORELEASER_PREVIOUS_TAG := $(shell git tag --sort=-creatordate | grep -E '^v?[0-9.]+$$' | grep "$(VERSION_TAG)" -A1 | sed -n '2 p') release: gen buildx $(GORELEASER) --rm-dist make publish-nvcr @@ -279,7 +279,7 @@ release: gen buildx release-dryrun: export DET_SEGMENT_MASTER_KEY ?= release-dryrun: export DET_SEGMENT_WEBUI_KEY ?= release-dryrun: export GORELEASER_CURRENT_TAG := $(VERSION_TAG) -release-dryrun: export GORELEASER_PREVIOUS_TAG := $(shell git tag --sort=-creatordate | grep -E '^[0-9.]+$$' | grep "$(VERSION_TAG)" -A1 | sed -n '2 p') +release-dryrun: export GORELEASER_PREVIOUS_TAG := $(shell git tag --sort=-creatordate | grep -E '^v?[0-9.]+$$' | grep "$(VERSION_TAG)" -A1 | sed -n '2 p') # We intentionally do not invoke `make publish-nvcr(-dryrun)` here. release-dryrun: gen buildx $(GORELEASER) --rm-dist -f ./.goreleaser_dryrun.yml @@ -290,7 +290,7 @@ release-ee: export DET_SEGMENT_WEBUI_KEY ?= release-ee: export DET_EE_LICENSE_KEY = $(shell cat ../license.txt) release-ee: export DET_EE_PUBLIC_KEY = $(shell cat ../public.txt) release-ee: export GORELEASER_CURRENT_TAG := $(VERSION)-ee -release-ee: export GORELEASER_PREVIOUS_TAG := $(shell git tag --sort=-creatordate | grep -E '^[0-9.]+-ee$$' | grep "$(VERSION_TAG)-ee" -A1 | sed -n '2 p') +release-ee: export GORELEASER_PREVIOUS_TAG := $(shell git tag --sort=-creatordate | grep -E '^v?[0-9.]+-ee$$' | grep "$(VERSION_TAG)-ee" -A1 | sed -n '2 p') release-ee: gen buildx $(GORELEASER) --rm-dist -f ./.goreleaser_ee.yml