-
-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathMakefile
More file actions
28 lines (21 loc) · 752 Bytes
/
Makefile
File metadata and controls
28 lines (21 loc) · 752 Bytes
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
B=$(shell git rev-parse --abbrev-ref HEAD)
BRANCH=$(subst /,-,$(B))
GITREV=$(shell git describe --abbrev=7 --always --tags)
REV=$(GITREV)-$(BRANCH)-$(shell date +%Y%m%d-%H:%M:%S)
docker:
docker build -t umputun/updater:master --progress=plain .
dist:
goreleaser --snapshot --clean
race_test:
cd app && go test -race -timeout=60s -count 1 ./...
build: info
cd app && CGO_ENABLED=0 go build -ldflags "-X main.revision=$(REV) -s -w" -o /tmp/updater
site:
@rm -f site/public/*
docker build -f Dockerfile.site --progress=plain -t updater.site .
docker run -d --name=updater.site updater.site
docker cp updater.site:/build/public site/
docker rm -f updater.site
info:
- @echo "revision $(REV)"
.PHONY: dist docker race_test build info site