forked from 99designs/aws-vault
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
28 lines (20 loc) · 976 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
export GO111MODULE=on
VERSION=$(shell git describe --tags --candidates=1 --dirty)
FLAGS=-X main.Version=$(VERSION) -s -w
CERT="Developer ID Application: 99designs Inc (NRM9HVJ62Z)"
SRC=$(shell find . -name '*.go')
.PHONY: all clean release
all: aws-vault-linux-amd64 aws-vault-darwin-amd64 aws-vault-windows-386.exe aws-vault-freebsd-amd64
clean:
rm -f aws-vault-linux-amd64 aws-vault-darwin-amd64 aws-vault-windows-386.exe aws-vault-freebsd-amd64
release: all
codesign -s $(CERT) aws-vault-darwin-amd64
@echo "\nTo update homebrew-cask run\n\n cask-repair -v $(VERSION) aws-vault\n"
aws-vault-linux-amd64: $(SRC)
GOOS=linux GOARCH=amd64 go build -o $@ -ldflags="$(FLAGS)" .
aws-vault-darwin-amd64: $(SRC)
GOOS=darwin GOARCH=amd64 go build -o $@ -ldflags="$(FLAGS)" .
aws-vault-windows-386.exe: $(SRC)
GOOS=windows GOARCH=386 go build -o $@ -ldflags="$(FLAGS)" .
aws-vault-freebsd-amd64: $(SRC)
GOOS=freebsd GOARCH=amd64 go build -o $@ -ldflags="$(FLAGS)" .