Skip to content

Commit

Permalink
build: INFENG-938: Update version format in Makefiles (#10142)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidfluck-hpe authored Oct 28, 2024
1 parent 69b93b0 commit 3be954b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
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/goreleaser@v1.14.1
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/goreleaser@v1.14.1
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/goreleaser@v1.14.1
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/goreleaser@v1.14.1
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

0 comments on commit 3be954b

Please sign in to comment.