Browse Source

Make file versioning

Alex Myasoedov 6 years ago
parent
commit
35bd626830
1 changed files with 4 additions and 3 deletions
  1. 4 3
      Makefile

+ 4 - 3
Makefile

@@ -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)