Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: INFENG-938: Update version format in Makefiles #10142

Merged
merged 1 commit into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions agent/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
9 changes: 5 additions & 4 deletions helm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
git clean -df
Expand All @@ -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/[email protected]
Expand All @@ -40,15 +41,15 @@ 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/[email protected]
git clean -df
goreleaser --rm-dist -f ./.goreleaser_dryrun.yml

.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/[email protected]
git clean -df
Expand Down
6 changes: 3 additions & 3 deletions master/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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

Expand Down
Loading