-
Notifications
You must be signed in to change notification settings - Fork 71
/
Makefile
58 lines (41 loc) · 1.98 KB
/
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
TAG?=2.0.0
VERSION := $(shell echo `git describe --tags --long --match=*.*.* --dirty` | sed s/version-//g)
PKG=github.com/cloudtools/ssh-cert-authority
.PHONY: test vet
ssh-cert-authority:
go build -ldflags "-X ${PKG}/version.Tag=${TAG} -X ${PKG}/version.BuildVersion=${VERSION}" .
ssh-cert-authority-linux-amd64:
GOOS=linux GOARCH=amd64 \
go build -o ssh-cert-authority-linux-amd64 \
-ldflags "-X ${PKG}/version.Tag=${TAG} -X ${PKG}/version.BuildVersion=${VERSION}" .
ssh-cert-authority-linux-amd64.gz: ssh-cert-authority-linux-amd64
gzip -f ssh-cert-authority-linux-amd64
ssh-cert-authority-linux-arm64:
GOOS=linux GOARCH=arm64 \
go build -o ssh-cert-authority-linux-arm64 \
-ldflags "-X ${PKG}/version.Tag=${TAG} -X ${PKG}/version.BuildVersion=${VERSION}" .
ssh-cert-authority-linux-arm64.gz: ssh-cert-authority-linux-arm64
gzip -f ssh-cert-authority-linux-arm64
ssh-cert-authority-linux-arm7:
GOOS=linux GOARCH=arm7 \
go build -o ssh-cert-authority-linux-arm7 \
-ldflags "-X ${PKG}/version.Tag=${TAG} -X ${PKG}/version.BuildVersion=${VERSION}" .
ssh-cert-authority-linux-arm7.gz: ssh-cert-authority-linux-arm7
gzip -f ssh-cert-authority-linux-arm7
ssh-cert-authority-darwin-amd64:
GOOS=darwin GOARCH=amd64 \
go build -o ssh-cert-authority-darwin-amd64 \
-ldflags "-X ${PKG}/version.Tag=${TAG} -X ${PKG}/version.BuildVersion=${VERSION}" .
ssh-cert-authority-darwin-amd64.gz: ssh-cert-authority-darwin-amd64
gzip -f ssh-cert-authority-darwin-amd64
ssh-cert-authority-darwin-arm64:
GOOS=darwin GOARCH=arm64 \
go build -o ssh-cert-authority-darwin-arm64 \
-ldflags "-X ${PKG}/version.Tag=${TAG} -X ${PKG}/version.BuildVersion=${VERSION}" .
ssh-cert-authority-darwin-arm64.gz: ssh-cert-authority-darwin-arm64
gzip -f ssh-cert-authority-darwin-arm64
release: ssh-cert-authority-darwin-amd64.gz ssh-cert-authority-darwin-arm64.gz ssh-cert-authority-linux-amd64.gz ssh-cert-authority-linux-arm64.gz ssh-cert-authority-linux-arm7
test:
@go test ./...
vet:
@go vet ./...