.PHONY: all build push

all: build push

VERSION := $(shell date +%Y-%m-%dT%H.%M)

build:
	docker build -t security/aad-pre-oauthorize .
rebuild:
	docker build --no-cache -t security/aad-pre-oauthorize .

push:
	docker tag security/aad-pre-oauthorize registry.yandex.net/security/aad-pre-oauthorize:$(VERSION)
	docker push "registry.yandex.net/security/aad-pre-oauthorize:$(VERSION)"
	@echo
	@echo "Well done!"
	@echo "Uploaded: registry.yandex.net/security/aad-pre-oauthorize:$(VERSION)"
