diff --git a/Makefile b/Makefile index f6fa9d45c53a1336d3592bda71be04b7a0fcb9ce..c4b68ee1042d120c995f9d2ebbecd4bda0357e2b 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,5 @@ +commit := $(shell git rev-parse --short HEAD) + build: dist/go-httpbin dist/go-httpbin: assets cmd/go-httpbin/*.go httpbin/*.go @@ -28,7 +30,7 @@ image: assets cmd/go-httpbin/*.go httpbin/*.go mkdir -p /tmp/go-httpbin-docker cp Dockerfile /tmp/go-httpbin-docker GOOS=linux GOARCH=amd64 go build -o /tmp/go-httpbin-docker/go-httpbin ./cmd/go-httpbin - docker build -t mccutchen/go-httpbin /tmp/go-httpbin-docker + docker build -t mccutchen/go-httpbin:$(commit) /tmp/go-httpbin-docker imagepush: image - docker push mccutchen/go-httpbin + docker push mccutchen/go-httpbin:$(commit)