Skip to content

Commit

Permalink
block pushes on non-clean git repos
Browse files Browse the repository at this point in the history
  • Loading branch information
drewwells committed Apr 6, 2021
1 parent f0f0583 commit dae3a0c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions atlas/templates/Makefile.common.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit dae3a0c

Please sign in to comment.