This repository was archived by the owner on May 18, 2018. It is now read-only.
forked from Versent/saml2aws
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
61 lines (51 loc) · 1.46 KB
/
Makefile
File metadata and controls
61 lines (51 loc) · 1.46 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
NAME=saml2aws
ARCH=$(shell uname -m)
VERSION=1.6.1
ITERATION := 1
default: deps compile
glide:
ifeq ($(shell uname),Darwin)
curl -L https://github.com/Masterminds/glide/releases/download/v0.12.3/glide-v0.12.3-darwin-amd64.zip -o glide.zip
unzip glide.zip
mv ./darwin-amd64/glide ./glide
rm -fr ./darwin-amd64
rm ./glide.zip
else
curl -L https://github.com/Masterminds/glide/releases/download/v0.12.3/glide-v0.12.3-linux-386.zip -o glide.zip
unzip glide.zip
mv ./linux-386/glide ./glide
rm -fr ./linux-386
rm ./glide.zip
endif
deps: glide
# go get github.com/buildkite/github-release
go get github.com/mitchellh/gox
./glide install
compile: deps
@rm -rf build/
@gox -ldflags "-X main.Version=$(VERSION)" \
-osarch="darwin/amd64" \
-osarch="linux/i386" \
-osarch="linux/amd64" \
-osarch="windows/amd64" \
-osarch="windows/i386" \
-output "build/{{.Dir}}_$(VERSION)_{{.OS}}_{{.Arch}}/$(NAME)" \
$(shell glide novendor)
install:
go install ./cmd/saml2aws
dist:
$(eval FILES := $(shell ls build))
@rm -rf dist && mkdir dist
@for f in $(FILES); do \
(cd $(shell pwd)/build/$$f && tar -cvzf ../../dist/$$f.tar.gz *); \
(cd $(shell pwd)/dist && shasum -a 512 $$f.tar.gz > $$f.sha512); \
echo $$f; \
done
release:
@github-release "v$(VERSION)" dist/* --commit "$(git rev-parse HEAD)" --github-repository versent/$(NAME)
test: deps
go test -cover -v $(shell glide novendor)
clean:
rm ./glide
rm -fr ./build
.PHONY: default deps compile dist release test clean