From 7f1d9619bc1ad9b7013c60b71194e37062eabc25 Mon Sep 17 00:00:00 2001 From: Alex Myasoedov Date: Mon, 5 Mar 2018 20:29:19 -0500 Subject: [PATCH] Update makefile. --- Makefile | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index c87bace..015e99f 100644 --- a/Makefile +++ b/Makefile @@ -1,19 +1,23 @@ GIT_SUMMARY := $(shell git describe --tags --dirty --always) REPO=msoedov/hacker-slides - +DOCKER_IMAGE := $(REPO):$(GIT_SUMMARY) default: repo repo: - @echo $(REPO):$(GIT_SUMMARY) + @echo $(DOCKER_IMAGE) build: @GOOS=linux CGO_ENABLE=0 go build main.go - @docker build -t $(REPO):$(GIT_SUMMARY) . - @docker tag $(REPO):$(GIT_SUMMARY) $(REPO) + @docker build -t $(DOCKER_IMAGE) . + @docker tag $(DOCKER_IMAGE) $(REPO) push: - @docker push $(REPO):$(GIT_SUMMARY) + @docker push $(DOCKER_IMAGE) @docker push $(REPO) r: - @docker run -it -p 8080:8080 $(REPO):$(GIT_SUMMARY) + @docker run -it -p 8080:8080 $(DOCKER_IMAGE) + +release: + @build + @push