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 {