forked from apprenda-kismatic/kubernetes-ldap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
31 lines (24 loc) · 777 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
ifeq ($(origin VERSION), undefined)
VERSION=$(git rev-parse --short HEAD)
endif
GOOS=$(shell go env GOOS)
GOARCH=$(shell go env GOARCH)
REPOPATH = kismatic/kubernetes-ldap
build: vendor
go build -o bin/kubernetes-ldap -ldflags "-X $(REPOPATH).Version=$(VERSION)" ./cmd/kubernetes-ldap.go
test: bin/glide
go test $(shell ./bin/glide novendor)
vet: bin/glide
go vet $(shell ./bin/glide novendor)
fmt: bin/glide
go fmt $(shell ./bin/glide novendor)
run:
./bin/kubernetes-ldap
vendor: bin/glide
./bin/glide install
bin/glide:
@echo "Downloading glide"
mkdir -p bin
curl -L https://github.com/Masterminds/glide/releases/download/v0.12.3/glide-v0.12.3-$(GOOS)-$(GOARCH).tar.gz | tar -xz -C bin
mv bin/$(GOOS)-$(GOARCH)/glide bin/glide
rm -r bin/$(GOOS)-$(GOARCH)