From f08e9012188f16811a8015376994f7af4fa54a03 Mon Sep 17 00:00:00 2001 From: Drew Wells Date: Tue, 6 Apr 2021 15:29:08 -0500 Subject: [PATCH] block pushes on non-clean git repos --- atlas/templates/Makefile.common.gotmpl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/atlas/templates/Makefile.common.gotmpl b/atlas/templates/Makefile.common.gotmpl index 54ab426..4f7bd66 100644 --- a/atlas/templates/Makefile.common.gotmpl +++ b/atlas/templates/Makefile.common.gotmpl @@ -28,7 +28,7 @@ GENERATOR ?= $(DOCKER_RUNNER) $(DOCKER_GENERATOR) export GOFLAGS ?= -mod=vendor GO_CACHE ?= -pkgdir $(BUILD_PATH)/go-cache GO_BUILD_FLAGS ?= $(GO_CACHE) -i -v -GO_TEST_FLAGS ?= -v -cover +GO_TEST_FLAGS ?= -v -cover GO_PACKAGES ?= $(shell go list ./... | grep -v vendor) @@ -78,7 +78,9 @@ push-atlas: docker ifndef IMAGE_REGISTRY @(echo "Please set IMAGE_REGISTRY variable in Makefile.vars to use push command"; exit 1) else - @docker push $(SERVER_IMAGE):$(IMAGE_VERSION) + # Verify no changes locally prior to pushing image + git diff --exit-code + docker push $(SERVER_IMAGE):$(IMAGE_VERSION) endif .push-$(IMAGE_NAME)-$(IMAGE_VERSION):