-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (29 loc) · 799 Bytes
/
Makefile
File metadata and controls
37 lines (29 loc) · 799 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
35
36
37
PLATFORM?=$(shell uname | tr [A-Z] [a-z])
export GO111MODULE = on
.PHONY: default
default: $(PLATFORM)
.PHONY: install
install: plugin
dcos plugin add -u ./build/plugins/dcos-http-cli.$(PLATFORM).zip
.PHONY: plugin
plugin: $(PLATFORM)
mkdir -p build/plugins
(cd build/$(PLATFORM); zip -r ../plugins/dcos-http-cli.$(PLATFORM).zip .)
.PHONY: darwin linux windows
darwin linux windows:
GOOS=$(@) go build -mod=vendor -o build/$(@)/bin/dcos-http ./cmd/dcos-http
cp plugin.toml build/$(@)/
cp -R completion build/$(@)
.PHONY: vet
vet: lint
go vet -mod=vendor ./...
.PHONY: lint
lint:
# Can be simplified once https://github.com/golang/lint/issues/320 is fixed.
golint -set_exit_status $(go list -mod=vendor ./...)
.PHONY: vendor
vendor:
go mod vendor
.PHONY: clean
clean:
rm -rf build