mirror of
https://github.com/umputun/reproxy.git
synced 2026-06-15 19:14:07 +02:00
add build target
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
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/reproxy .
|
||||
|
||||
@@ -12,4 +17,10 @@ dist:
|
||||
race_test:
|
||||
cd app && go test -race -mod=vendor -timeout=60s -count 1 ./...
|
||||
|
||||
.PHONY: dist docker race_test
|
||||
build: info
|
||||
- cd app && GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags "-X main.revision=$(REV)" -o ../dist/reproxy
|
||||
|
||||
info:
|
||||
- @echo "revision $(REV)"
|
||||
|
||||
.PHONY: dist docker race_test bin info
|
||||
|
||||
Reference in New Issue
Block a user