Skip to content
This repository has been archived by the owner on Sep 23, 2021. It is now read-only.

Commit

Permalink
Update makefile.
Browse files Browse the repository at this point in the history
  • Loading branch information
msoedov committed Mar 6, 2018
1 parent c6b9f67 commit 7f1d961
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 7f1d961

Please sign in to comment.