dataEconomy/Makefile

24 lines
429 B
Makefile
Raw Normal View History

2017-11-20 23:48:14 +01:00
GIT_SUMMARY := $(shell git describe --tags --dirty --always)
2017-02-08 02:02:35 +01:00
REPO=msoedov/hacker-slides
2018-03-06 02:29:19 +01:00
DOCKER_IMAGE := $(REPO):$(GIT_SUMMARY)
2017-02-08 02:06:16 +01:00
default: repo
repo:
2018-03-06 02:29:19 +01:00
@echo $(DOCKER_IMAGE)
2017-02-08 02:02:35 +01:00
build:
@GOOS=linux CGO_ENABLE=0 go build main.go
2018-03-06 02:29:19 +01:00
@docker build -t $(DOCKER_IMAGE) .
@docker tag $(DOCKER_IMAGE) $(REPO)
2017-02-08 02:02:35 +01:00
push:
2018-03-06 02:29:19 +01:00
@docker push $(DOCKER_IMAGE)
2018-01-19 02:30:13 +01:00
@docker push $(REPO)
2018-02-12 23:36:23 +01:00
r:
2018-03-06 02:29:19 +01:00
@docker run -it -p 8080:8080 $(DOCKER_IMAGE)
release:
@build
@push