diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -1,7 +1,8 @@ | |||
1 | IMAGE=docker.crute.me/ssh-proxy | 1 | IMAGE=docker.crute.me/ssh-proxy |
2 | BINARY=ssh-proxy | 2 | BINARY=ssh-proxy |
3 | CLIENT_BINARY=ssh-proxy-client | ||
3 | 4 | ||
4 | $(BINARY): $(shell find . -name '*.go') | 5 | $(BINARY): $(CLIENT_BINARY) $(shell find . -name '*.go') |
5 | @[ "$(CLIENT_ID)" ] || ( echo "CLIENT_ID must be set"; exit 1 ) | 6 | @[ "$(CLIENT_ID)" ] || ( echo "CLIENT_ID must be set"; exit 1 ) |
6 | 7 | ||
7 | CGO_ENABLED=0 go build \ | 8 | CGO_ENABLED=0 go build \ |
@@ -9,6 +10,15 @@ $(BINARY): $(shell find . -name '*.go') | |||
9 | -X code.crute.us/mcrute/ssh-proxy/cmd/client.clientId=$(CLIENT_ID)" \ | 10 | -X code.crute.us/mcrute/ssh-proxy/cmd/client.clientId=$(CLIENT_ID)" \ |
10 | -o $@ | 11 | -o $@ |
11 | 12 | ||
13 | $(CLIENT_BINARY): $(shell find . -name '*.go') | ||
14 | @[ "$(CLIENT_ID)" ] || ( echo "CLIENT_ID must be set"; exit 1 ) | ||
15 | |||
16 | CGO_ENABLED=0 go build \ | ||
17 | -tags clientonly \ | ||
18 | -ldflags "-X main.appVersion=$(shell git describe --long --tags --dirty --always) \ | ||
19 | -X code.crute.us/mcrute/ssh-proxy/cmd/client.clientId=$(CLIENT_ID)" \ | ||
20 | -o $@ | ||
21 | |||
12 | .PHONY: vet | 22 | .PHONY: vet |
13 | vet: main.go | 23 | vet: main.go |
14 | go vet $< | 24 | go vet $< |