-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (22 loc) · 757 Bytes
/
Makefile
File metadata and controls
34 lines (22 loc) · 757 Bytes
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
PACKAGES:=$$(go list ./... | grep -v /vendor/)
.PHONY: build build build-arm build-linux build-docker test fmt all
all: build-all
install:
@glide install --strip-vendor
update:
@glide update --strip-vendor
fmt:
@go fmt $(PACKAGES)
lint:
@golint ./... | grep -vE "vendor|\.pb\.go" || printf ""
test:
go test -v $(PACKAGES)
build-all: build-darwin build-arm build-linux build-docker
build-darwin:
go build -o bin/controller_darwin .
build-linux:
GOOS=linux CGO_ENABLED=0 go build -a -ldflags '-s' -installsuffix cgo -o bin/controller_linux .
build-arm:
GOOS=linux GOARCH=arm GOARM=6 CGO_ENABLED=0 go build -a -ldflags '-s' -installsuffix cgo -o bin/controller_arm .
build-docker: build-linux
docker build -t stageautocontrol/controller .