Skip to content

Commit 74775d7

Browse files
authored
Add major version tag (#8026)
When the latest tag is added, also add a tag for the major version when the version tag matches the latest release defined in VERSION. Signed-off-by: Victor Araujo <[email protected]>
1 parent 4e5b172 commit 74775d7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Makefile.common

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,10 +245,12 @@ common-docker-publish: $(PUBLISH_DOCKER_ARCHS)
245245
$(PUBLISH_DOCKER_ARCHS): common-docker-publish-%:
246246
docker push "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:$(DOCKER_IMAGE_TAG)"
247247

248+
DOCKER_MAJOR_VERSION_TAG = $(firstword $(subst ., ,$(shell cat VERSION)))
248249
.PHONY: common-docker-tag-latest $(TAG_DOCKER_ARCHS)
249250
common-docker-tag-latest: $(TAG_DOCKER_ARCHS)
250251
$(TAG_DOCKER_ARCHS): common-docker-tag-latest-%:
251252
docker tag "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:$(DOCKER_IMAGE_TAG)" "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:latest"
253+
docker tag "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:$(DOCKER_IMAGE_TAG)" "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:v$(DOCKER_MAJOR_VERSION_TAG)"
252254

253255
.PHONY: common-docker-manifest
254256
common-docker-manifest:

0 commit comments

Comments
 (0)