forked from 99designs/aws-vault
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
30 lines (21 loc) · 857 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
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: build install sign release clean
build:
go build -o aws-vault -ldflags="$(FLAGS)" .
install:
go install -ldflags="$(FLAGS)" .
sign:
codesign -s $(CERT) ./aws-vault
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)" .
codesign -s $(CERT) $@
aws-vault-windows-386.exe: $(SRC)
GOOS=windows GOARCH=386 go build -o $@ -ldflags="$(FLAGS)" .
release: aws-vault-linux-amd64 aws-vault-darwin-amd64 aws-vault-windows-386.exe
clean:
rm -f aws-vault aws-vault-linux-amd64 aws-vault-darwin-amd64 aws-vault-windows-386.exe