Make file versioning

This commit is contained in:
Alex Myasoedov 2017-11-20 17:48:14 -05:00
parent 74e9462530
commit 35bd626830
No known key found for this signature in database
GPG key ID: D261413C245982F0

View file

@ -1,13 +1,14 @@
GIT_SUMMARY := $(shell git describe --tags --dirty --always)
REPO=msoedov/hacker-slides
default: repo
repo:
@echo $(REPO)
@echo $(REPO):$(GIT_SUMMARY)
build:
@GOOS=linux CGO_ENABLE=0 go build main.go
@docker build -t $(REPO) .
@docker build -t $(REPO):$(GIT_SUMMARY) .
push:
@docker push $(REPO)
@docker push $(REPO):$(GIT_SUMMARY)