forked from SAP/go-hdb
/
Makefile
40 lines (37 loc) · 1.01 KB
/
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
# builds and tests project via go tools
all:
@echo "update dependencies"
go get -u ./...
go mod tidy
@echo "build and test"
go build -v ./...
go vet ./...
golint -set_exit_status=true ./...
@echo staticcheck -checks all -fail none ./...
@echo execute tests on latest go version
go test ./...
@echo execute tests on older supported go versions
go1.19.5 test ./...
@echo "reuse (license) check"
reuse lint
#install additional tools
tools:
#install linter
@echo "install latest go linter version"
go install golang.org/x/lint/golint@latest
#install staticcheck
@echo "install latest staticcheck version"
go install honnef.co/go/tools/cmd/staticcheck@latest
#install additional go versions
go:
go install golang.org/dl/go1.19.5@latest
go1.19.5 download
#install fsfe reuse tool (https://git.fsfe.org/reuse/tool)
# pre-conditions:
# - Python 3.6+
# - pip
# install pre-conditions in Debian like linux distros:
# - sudo apt install python3
# - sudo apt install python3-pip
reuse:
pip3 install --user --upgrade reuse