-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathMakefile
32 lines (24 loc) · 861 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
ifndef GOPATH
$(warning You need to set up a GOPATH. See the README file.)
endif
PROJECT := github.com/juju/schemagen
.PHONY: check-go check
check: check-go
go test $(PROJECT)/...
check-go:
$(eval GOFMT := $(strip $(shell gofmt -l .| grep -v '^vendor/' | sed -e "s/^/ /g")))
@(if [ "x$(GOFMT)" != "x" ]; then \
echo go fmt is sad: $(GOFMT); \
exit 1; \
fi )
@(go vet -all -composites=false -copylocks=false .)
$(GOPATH)/bin/dep:
go get -u github.com/golang/dep/cmd/dep
# populate vendor/ from Gopkg.lock without updating it first (lock file is the single source of truth for machine).
dep: $(GOPATH)/bin/dep
$(GOPATH)/bin/dep ensure -vendor-only $(verbose)
rebuild-dependencies:
$(GOPATH)/bin/dep ensure -v -no-vendor $(dep-update)
install-dependencies:
@echo Installing go-1.17 snap
@sudo snap install go --channel=1.17/stable --classic