forked from segmentio/aws-okta
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
46 lines (38 loc) · 1.1 KB
/
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
37
38
39
40
41
42
43
44
45
46
VERSION := $(shell git describe --tags --always --dirty="-dev")
LDFLAGS := -ldflags='-X "main.Version=$(VERSION)"'
release: gh-release govendor clean dist
github-release release \
--security-token $$GH_LOGIN \
--user segmentio \
--repo aws-okta \
--tag $(VERSION) \
--name $(VERSION)
github-release upload \
--security-token $$GH_LOGIN \
--user segmentio \
--repo aws-okta \
--tag $(VERSION) \
--name aws-okta-$(VERSION)-linux-amd64 \
--file dist/aws-okta-$(VERSION)-linux-amd64
release-mac: gh-release govendor clean dist-mac
github-release upload \
--security-token $$GH_LOGIN \
--user segmentio \
--repo aws-okta \
--tag $(VERSION) \
--name aws-okta-$(VERSION)-darwin-amd64 \
--file dist/aws-okta-$(VERSION)-darwin-amd64
clean:
rm -rf ./dist
dist:
mkdir dist
govendor sync
GOOS=linux GOARCH=amd64 go build $(LDFLAGS) -o dist/aws-okta-$(VERSION)-linux-amd64
dist-mac:
mkdir dist
govendor sync
GOOS=darwin GOARCH=amd64 go build $(LDFLAGS) -o dist/aws-okta-$(VERSION)-darwin-amd64
gh-release:
go get -u github.com/aktau/github-release
govendor:
go get -u github.com/kardianos/govendor