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