-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
Makefile
36 lines (27 loc) · 957 Bytes
/
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
.PHONY: test
test:
go test .
BINARY := cask
VERSION ?= latest
.PHONY: windows
windows:
mkdir -p release
GOOS=windows GOARCH=amd64 go build -ldflags "-X main.version=$(VERSION)" -o release/windows-$(VERSION)/custodian-cask.exe
.PHONY: linux
linux:
mkdir -p release
GOOS=linux GOARCH=amd64 go build -ldflags "-X main.version=$(VERSION)" -o release/linux-$(VERSION)/custodian-cask
.PHONY: linux-arm
linux-arm:
mkdir -p release
GOOS=linux GOARCH=arm64 go build -ldflags "-X main.version=$(VERSION)" -o release/linux-arm64-$(VERSION)/custodian-cask
.PHONY: darwin
darwin:
mkdir -p release
GOOS=darwin GOARCH=amd64 go build -ldflags "-X main.version=$(VERSION)" -o release/darwin-$(VERSION)/custodian-cask
.PHONY: darwin-arm
darwin-arm:
mkdir -p release
GOOS=darwin GOARCH=arm64 go build -ldflags "-X main.version=$(VERSION)" -o release/darwin-arm64-$(VERSION)/custodian-cask
.PHONY: release
release: windows linux linux-arm darwin darwin-arm