blob: 9dee6517a1409939827d54482f41d4230402dba5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
COMMIT = $(shell git describe --always --long --dirt)
TIME = $(shell date +'%Y-%m-%d/%H:%M:%S')
VERSION = $(COMMIT) at $(TIME)
LDFLAGS = -ldflags "-X 'main.BuildVersion=$(VERSION)'"
prefix = /usr/local
build:
go build $(LDFLAGS) -v -o bin/ ./...
fmt:
go fmt tunnel/...
test:
go test tunnel/pkg/test
install:
install -D bin/tunnel $(prefix)/bin/tunnel
install -D bin/tunneld $(prefix)/bin/tunneld
.PHONY: build fmt test
|