forked from segmentio/aws-okta
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
33 lines (24 loc) · 833 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
# Goals:
# - user can build binaries on their system without having to install special tools
# - user can fork the canonical repo and expect to be able to run CircleCI checks
#
# This makefile is meant for humans
VERSION := $(shell git describe --tags --always --dirty="-dev")
LDFLAGS := -ldflags='-X "main.Version=$(VERSION)"'
test: | govendor
govendor sync
go test -v ./...
all: dist/aws-okta-$(VERSION)-darwin-amd64 dist/aws-okta-$(VERSION)-linux-amd64
clean:
rm -rf ./dist
dist/:
mkdir -p dist
dist/aws-okta-$(VERSION)-darwin-amd64: | govendor dist/
govendor sync
GOOS=darwin GOARCH=amd64 go build $(LDFLAGS) -o $@
dist/aws-okta-$(VERSION)-linux-amd64: | govendor dist/
govendor sync
GOOS=linux GOARCH=amd64 go build $(LDFLAGS) -o $@
govendor:
go get -u github.com/kardianos/govendor
.PHONY: clean all govendor