Skip to content

Commit c427c61

Browse files
tpoundsjirfag
authored andcommitted
Use separate go.mod/go.sum to manage tool deps. (#736)
Fixes downstream `go get` issues due to broken/invalid transitive goreleaser dependencies. Fixes #730
1 parent a16b4d8 commit c427c61

File tree

1,429 files changed

+53
-395814
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,429 files changed

+53
-395814
lines changed

.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,7 @@
55
/.idea/
66
/test/path
77
/golangci-lint
8-
/tools/
8+
/tools/Dracula.itermcolors
9+
/tools/node_modules
10+
/tools/svg-term
911
/.vscode/

Makefile

+12-10
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,11 @@ build_race: FORCE
1616
go build -race -o golangci-lint ./cmd/golangci-lint
1717
build: golangci-lint
1818
clean:
19-
rm -f golangci-lint test/path
20-
rm -rf tools
19+
rm -f golangci-lint
20+
rm -f test/path
21+
rm -f tools/svg-term
22+
rm -f tools/Dracula.itermcolors
23+
rm -rf tools/node_modules
2124
.PHONY: fast_build build build_race clean
2225

2326
# Test
@@ -60,30 +63,29 @@ fast_check_generated:
6063
git diff --exit-code # check no changes
6164
.PHONY: fast_check_generated
6265

63-
release:
64-
go run ./vendor/github.com/goreleaser/goreleaser
66+
release: export GOFLAGS = -mod=readonly
67+
release: .goreleaser.yml
68+
cd tools && go run github.com/goreleaser/goreleaser --config ../.goreleaser.yml
6569
.PHONY: release
6670

6771
# Non-PHONY targets (real files)
6872

6973
golangci-lint: FORCE
7074
go build -o $@ ./cmd/golangci-lint
7175

72-
tools:
73-
@mkdir -p tools
74-
75-
tools/svg-term: tools
76+
tools/svg-term: tools/package.json tools/package-lock.json
7677
cd tools && npm ci
7778
ln -sf node_modules/.bin/svg-term $@
7879

79-
tools/Dracula.itermcolors: tools
80+
tools/Dracula.itermcolors:
8081
curl -fL -o $@ https://raw.githubusercontent.com/dracula/iterm/master/Dracula.itermcolors
8182

8283
docs/demo.svg: tools/svg-term tools/Dracula.itermcolors
8384
./tools/svg-term --cast=183662 --out docs/demo.svg --window --width 110 --height 30 --from 2000 --to 20000 --profile ./tools/Dracula.itermcolors --term iterm2
8485

86+
install.sh: export GOFLAGS = -mod=readonly
8587
install.sh: .goreleaser.yml
86-
go run ./vendor/github.com/goreleaser/godownloader .goreleaser.yml | sed '/DO NOT EDIT/s/ on [0-9TZ:-]*//' > $@
88+
cd tools && go run github.com/goreleaser/godownloader ../.goreleaser.yml | sed '/DO NOT EDIT/s/ on [0-9TZ:-]*//' > ../$@
8789

8890
README.md: FORCE golangci-lint
8991
go run ./scripts/gen_readme/main.go

go.mod

-9
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ require (
2121
github.com/golangci/prealloc v0.0.0-20180630174525-215b22d4de21
2222
github.com/golangci/revgrep v0.0.0-20180526074752-d9c87f5ffaf0
2323
github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4
24-
github.com/goreleaser/godownloader v0.0.0-20190907185828-93b2b793cd90
25-
github.com/goreleaser/goreleaser v0.118.0
2624
github.com/matoous/godox v0.0.0-20190910121045-032ad8106c86
2725
github.com/mattn/go-colorable v0.1.2
2826
github.com/mitchellh/go-homedir v1.1.0
@@ -49,13 +47,6 @@ require (
4947
)
5048

5149
replace (
52-
// Fix godownloader/goreleaser deps (ambiguous imports/invalid pseudo-version)
53-
// https://github.com/goreleaser/godownloader/issues/133
54-
// https://github.com/goreleaser/goreleaser/issues/1145
55-
github.com/Azure/go-autorest => github.com/Azure/go-autorest v13.0.1+incompatible
56-
github.com/census-instrumentation/opencensus-proto => github.com/census-instrumentation/opencensus-proto v0.2.1
57-
github.com/go-macaron/cors => github.com/go-macaron/cors v0.0.0-20190418220122-6fd6a9bfe14e
58-
5950
// https://github.com/timakin/bodyclose/pull/20
6051
github.com/timakin/bodyclose => github.com/golangci/bodyclose v0.0.0-20190924091105-43b3ff1b0de0
6152

go.sum

+2-824
Large diffs are not rendered by default.

tools/go.mod

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
module github.com/golangci/golangci-lint/tools
2+
3+
go 1.12
4+
5+
require (
6+
github.com/goreleaser/godownloader v0.0.0-20190924012648-96e3b3dd514b
7+
github.com/goreleaser/goreleaser v0.118.1
8+
)
9+
10+
// Fix godownloader/goreleaser deps (ambiguous imports/invalid pseudo-version)
11+
// https://github.com/goreleaser/goreleaser/issues/1145
12+
replace github.com/go-macaron/cors => github.com/go-macaron/cors v0.0.0-20190418220122-6fd6a9bfe14e
+20-125
Large diffs are not rendered by default.

tools.go renamed to tools/tools.go

File renamed without changes.

vendor/cloud.google.com/go/LICENSE

-202
This file was deleted.

0 commit comments

Comments
 (0)