-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
33 lines (29 loc) · 1010 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
GOPATH := $(shell go env GOPATH)
# print help by default
.PHONY: help
help:
@echo "Run \"make install\" to install scripts to ${GOPATH}"
@echo "Run \"make uninstall\" to unintall scripts from ${GOPATH}"
@echo ""
@echo "Run \"make test\" to test child libraries (after \"make install\")"
@echo "Run \"make lint\" to check all code (after \"make install\")"
@echo "Run \"make pretty\" to reformat all code"
@echo "Run \"make upgrade\" to upgrade dependencies"
@echo ""
@go version
.PHONY: install
install:
mkdir -p ${GOPATH}/bin
install scripts/gotils-prereq.sh ${GOPATH}/bin/
install scripts/gotils-lint.sh ${GOPATH}/bin/
mkdir -p ${GOPATH}/opt/gotils
cp -a templates ${GOPATH}/opt/gotils/
cp -a Common.mk ${GOPATH}/opt/gotils/
cp -a README.md ${GOPATH}/opt/gotils/
${GOPATH}/bin/gotils-prereq.sh
.PHONY: uninstall
uninstall:
rm -f ${GOPATH}/bin/{exhaustivestruct,scopelint,shadow,staticcheck,golangci-lint}
rm -f ${GOPATH}/bin/gotils-*.sh
rm -fr ${GOPATH}/opt/gotils
include Common.mk