@@ -11,11 +11,15 @@ clean:
11
11
12
12
# Test
13
13
14
+ # until https://github.com/OpenPeeDeeP/depguard/issues/7 fixed
15
+ test : export GO111MODULE = off
16
+ test : export GOLANGCI_LINT_INSTALLED = true
17
+
14
18
test : build
15
- GL_TEST_RUN=1 ./golangci-lint run -v
16
- GL_TEST_RUN=1 ./golangci-lint run --fast --no-config -v --skip-dirs ' test/testdata_etc,pkg/golinters/goanalysis/(checker|passes)'
17
- GL_TEST_RUN=1 ./golangci-lint run --no-config -v --skip-dirs ' test/testdata_etc,pkg/golinters/goanalysis/(checker|passes)'
18
- GL_TEST_RUN=1 go test -v ./...
19
+ GL_TEST_RUN=1 time ./golangci-lint run -v
20
+ GL_TEST_RUN=1 time ./golangci-lint run --fast --no-config -v --skip-dirs ' test/testdata_etc,pkg/golinters/goanalysis/(checker|passes)'
21
+ GL_TEST_RUN=1 time ./golangci-lint run --no-config -v --skip-dirs ' test/testdata_etc,pkg/golinters/goanalysis/(checker|passes)'
22
+ GL_TEST_RUN=1 time go test -v ./...
19
23
20
24
.PHONY : test
21
25
@@ -30,8 +34,9 @@ test_linters:
30
34
31
35
# Maintenance
32
36
33
- generate : README.md install.sh pkg/logutils/log_mock.go vendor
34
- generate_svg : docs/demo.svg
37
+ generate : README.md docs/demo.svg install.sh pkg/logutils/log_mock.go vendor
38
+ fast_generate : README.md vendor
39
+
35
40
maintainer-clean : clean
36
41
rm -f docs/demo.svg README.md install.sh pkg/logutils/log_mock.go
37
42
rm -rf vendor
@@ -40,9 +45,17 @@ maintainer-clean: clean
40
45
check_generated :
41
46
$(MAKE ) --always-make generate
42
47
git checkout -- go.mod go.sum # can differ between go1.11 and go1.12
48
+ git checkout -- vendor/modules.txt # can differ between go1.12 and go1.13
43
49
git diff --exit-code # check no changes
44
50
.PHONY : check_generated
45
51
52
+ fast_check_generated :
53
+ $(MAKE ) --always-make fast_generate
54
+ git checkout -- go.mod go.sum # can differ between go1.11 and go1.12
55
+ git checkout -- vendor/modules.txt # can differ between go1.12 and go1.13
56
+ git diff --exit-code # check no changes
57
+ .PHONY : fast_check_generated
58
+
46
59
release :
47
60
rm -rf dist
48
61
curl -sL https://git.io/goreleaser | bash
@@ -65,7 +78,8 @@ tools/go.mod:
65
78
cd tools && GO111MODULE=on go mod init local-tools
66
79
67
80
tools/godownloader : Makefile tools/go.mod
68
- cd tools && GOBIN=$(CURDIR ) /tools GO111MODULE=on go get github.com/goreleaser/godownloader@3b90d248ba30307915288f08ab3f2fc2d9f6710c
81
+ # https://github.com/goreleaser/godownloader/issues/133
82
+ cd tools && GOBIN=$(CURDIR ) /tools GO111MODULE=off go get github.com/goreleaser/godownloader
69
83
70
84
tools/svg-term :
71
85
@mkdir -p tools
@@ -79,7 +93,8 @@ tools/Dracula.itermcolors:
79
93
docs/demo.svg : tools/svg-term tools/Dracula.itermcolors
80
94
PATH=$(CURDIR ) /tools:$$ {PATH} svg-term --cast=183662 --out docs/demo.svg --window --width 110 --height 30 --from 2000 --to 20000 --profile ./tools/Dracula.itermcolors --term iterm2
81
95
82
- install.sh : tools/godownloader .goreleaser.yml
96
+ install.sh :
97
+ # dependencies: tools/godownloader .goreleaser.yml
83
98
# TODO: use when Windows installation will be fixed in the upstream
84
99
# PATH=$(CURDIR)/tools:$${PATH} tools/godownloader .goreleaser.yml | sed '/DO NOT EDIT/s/ on [0-9TZ:-]*//' > $@
85
100
0 commit comments