forked from golang/dep
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
40 lines (31 loc) · 996 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
32
33
34
35
36
37
38
39
40
SHELL="/bin/bash"
PLATFORM=$(shell go env GOOS)
ARCH=$(shell go env GOARCH)
GOPATH=$(shell go env GOPATH)
GOBIN=$(GOPATH)/bin
default: build validate test
get-deps:
# Workaround https://github.com/golang/lint/issues/397
[ -d $(GOPATH)/src/golang.org/x ] || mkdir -p $(GOPATH)/src/golang.org/x
git clone --depth=1 https://github.com/golang/lint.git $(GOPATH)/src/golang.org/x/lint
# End workaround
go get -u golang.org/x/lint/golint honnef.co/go/tools/cmd/megacheck
build:
go fmt ./...
DEP_BUILD_PLATFORMS=$(PLATFORM) DEP_BUILD_ARCHS=$(ARCH) ./hack/build-all.bash
cp ./release/dep-$(PLATFORM)-$(ARCH) dep
licenseok:
go build ./hack/licenseok
validate: build licenseok
./hack/lint.bash
./hack/validate-vendor.bash
./hack/validate-licence.bash
test:
./hack/test.bash
install: build
cp ./dep $(GOBIN)
docusaurus:
docker run --rm -it -v `pwd`:/dep -p 3000:3000 \
-w /dep/website node \
bash -c "npm i --only=dev && npm start"
.PHONY: build validate test install docusaurus