Update makefile.
This commit is contained in:
parent
c6b9f67933
commit
7f1d9619bc
1 changed files with 10 additions and 6 deletions
16
Makefile
16
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
|
||||
|
|
Loading…
Reference in a new issue