-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathMakefile
33 lines (25 loc) · 918 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
.PHONY: build
TAG=$(shell git describe --abbrev=0 --tags)
DATE=$(shell go run ./scripts/date.go)
build:
@go mod tidy && \
go build -ldflags "-X main.version=$(TAG) -X main.buildDate=$(DATE)" -o resto
install: resto
@mv resto /usr/local/bin
brc: # build resto container
@docker build -t restohq/resto . && \
docker push restohq/resto
brcwc: # build resto container with cache
@docker pull restohq/resto:latest && \
docker build -t restohq/resto --cache-from restohq/resto:latest . && \
docker push restohq/resto
bfrc: # build full resto container
@cd container && \
docker build -t restohq/resto-full . && \
docker push restohq/resto-full
bfrcwc: # build full resto container with cache
@docker pull restohq/resto-full:latest && \
docker build -t restohq/resto-full --cache-from restohq/resto-full:latest . && \
docker push restohq/resto-full
ghrs:
@node scripts/gh-resto/gh-rs.js