forked from segmentio/aws-okta
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
27 lines (19 loc) · 779 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
# 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:
GO111MODULE=on go test -mod=vendor -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: | dist/
GOOS=darwin GOARCH=amd64 GO111MODULE=on go build -mod=vendor $(LDFLAGS) -o $@
dist/aws-okta-$(VERSION)-linux-amd64: | dist/
GOOS=linux GOARCH=amd64 GO111MODULE=on go build -mod=vendor $(LDFLAGS) -o $@
.PHONY: clean all