From 22804ff48efae434dc3bfc7b1e775c747d5772da Mon Sep 17 00:00:00 2001 From: Andrew Rynhard Date: Sat, 12 Jan 2019 19:38:50 -0800 Subject: [PATCH] chore: fix image tag (#100) Signed-off-by: Andrew Rynhard --- Makefile | 16 ++++++++-------- internal/enforcer/enforcer.go | 1 + 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 38f51458..75fa24f8 100644 --- a/Makefile +++ b/Makefile @@ -16,28 +16,28 @@ enforce: .PHONY: build build: @docker build \ - -t conform/$@:$(SHA) \ + -t conform/$@:$(TAG) \ --target=$@ \ $(COMMON_ARGS) - @docker run --rm -it -v $(PWD)/build:/build conform/$@:$(SHA) cp /conform-linux-amd64 /build - @docker run --rm -it -v $(PWD)/build:/build conform/$@:$(SHA) cp /conform-darwin-amd64 /build + @docker run --rm -it -v $(PWD)/build:/build conform/$@:$(TAG) cp /conform-linux-amd64 /build + @docker run --rm -it -v $(PWD)/build:/build conform/$@:$(TAG) cp /conform-darwin-amd64 /build test: @docker build \ - -t conform/$@:$(SHA) \ + -t conform/$@:$(TAG) \ --target=$@ \ $(COMMON_ARGS) - @docker run --rm -it -v $(PWD)/build:/build conform/$@:$(SHA) cp /coverage.txt /build + @docker run --rm -it -v $(PWD)/build:/build conform/$@:$(TAG) cp /coverage.txt /build image: build @docker build \ - -t autonomy/conform:$(SHA) \ + -t autonomy/conform:$(TAG) \ --target=$@ \ $(COMMON_ARGS) push: image - @docker tag autonomy/conform:$(SHA) autonomy/conform:latest - @docker push autonomy/conform:$(SHA) + @docker tag autonomy/conform:$(TAG) autonomy/conform:latest + @docker push autonomy/conform:$(TAG) @docker push autonomy/conform:latest deps: diff --git a/internal/enforcer/enforcer.go b/internal/enforcer/enforcer.go index 6fdde4cb..947d2397 100644 --- a/internal/enforcer/enforcer.go +++ b/internal/enforcer/enforcer.go @@ -69,6 +69,7 @@ func (c *Conform) Enforce(setters ...policy.Option) { } } + // nolint: errcheck w.Flush() if failed {