mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-07-30 20:12:42 +00:00
Merge pull request #542 from ncdc/makefile-tag-latest-bool
Add TAG_LATEST support to Makefile
This commit is contained in:
@@ -28,6 +28,8 @@ ARCH ?= linux-amd64
|
||||
|
||||
VERSION ?= master
|
||||
|
||||
TAG_LATEST ?= false
|
||||
|
||||
###
|
||||
### These variables should not need tweaking.
|
||||
###
|
||||
@@ -132,11 +134,11 @@ all-push:
|
||||
$(MAKE) push
|
||||
$(MAKE) push BIN=ark-restic-restore-helper
|
||||
|
||||
|
||||
push: .push-$(DOTFILE_IMAGE) push-name
|
||||
.push-$(DOTFILE_IMAGE): .container-$(DOTFILE_IMAGE)
|
||||
@docker push $(IMAGE):$(VERSION)
|
||||
@if git describe --tags --exact-match >/dev/null 2>&1; \
|
||||
then \
|
||||
@if [[ "$(TAG_LATEST)" == "true" ]]; then \
|
||||
docker tag $(IMAGE):$(VERSION) $(IMAGE):latest; \
|
||||
docker push $(IMAGE):latest; \
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user