Skip to content

Commit

Permalink
Use separate go.mod/go.sum to manage tool deps. (#736)
Browse files Browse the repository at this point in the history
Fixes downstream `go get` issues due to broken/invalid
transitive goreleaser dependencies.

Fixes #730
  • Loading branch information
tpounds authored and jirfag committed Sep 24, 2019
1 parent a16b4d8 commit c427c61
Show file tree
Hide file tree
Showing 1,429 changed files with 53 additions and 395,814 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Expand Up @@ -5,5 +5,7 @@
/.idea/
/test/path
/golangci-lint
/tools/
/tools/Dracula.itermcolors
/tools/node_modules
/tools/svg-term
/.vscode/
22 changes: 12 additions & 10 deletions Makefile
Expand Up @@ -16,8 +16,11 @@ build_race: FORCE
go build -race -o golangci-lint ./cmd/golangci-lint
build: golangci-lint
clean:
rm -f golangci-lint test/path
rm -rf tools
rm -f golangci-lint
rm -f test/path
rm -f tools/svg-term
rm -f tools/Dracula.itermcolors
rm -rf tools/node_modules
.PHONY: fast_build build build_race clean

# Test
Expand Down Expand Up @@ -60,30 +63,29 @@ fast_check_generated:
git diff --exit-code # check no changes
.PHONY: fast_check_generated

release:
go run ./vendor/github.com/goreleaser/goreleaser
release: export GOFLAGS = -mod=readonly
release: .goreleaser.yml
cd tools && go run github.com/goreleaser/goreleaser --config ../.goreleaser.yml
.PHONY: release

# Non-PHONY targets (real files)

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

tools:
@mkdir -p tools

tools/svg-term: tools
tools/svg-term: tools/package.json tools/package-lock.json
cd tools && npm ci
ln -sf node_modules/.bin/svg-term $@

tools/Dracula.itermcolors: tools
tools/Dracula.itermcolors:
curl -fL -o $@ https://raw.githubusercontent.com/dracula/iterm/master/Dracula.itermcolors

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

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

README.md: FORCE golangci-lint
go run ./scripts/gen_readme/main.go
Expand Down
9 changes: 0 additions & 9 deletions go.mod
Expand Up @@ -21,8 +21,6 @@ require (
github.com/golangci/prealloc v0.0.0-20180630174525-215b22d4de21
github.com/golangci/revgrep v0.0.0-20180526074752-d9c87f5ffaf0
github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4
github.com/goreleaser/godownloader v0.0.0-20190907185828-93b2b793cd90
github.com/goreleaser/goreleaser v0.118.0
github.com/matoous/godox v0.0.0-20190910121045-032ad8106c86
github.com/mattn/go-colorable v0.1.2
github.com/mitchellh/go-homedir v1.1.0
Expand All @@ -49,13 +47,6 @@ require (
)

replace (
// Fix godownloader/goreleaser deps (ambiguous imports/invalid pseudo-version)
// https://github.com/goreleaser/godownloader/issues/133
// https://github.com/goreleaser/goreleaser/issues/1145
github.com/Azure/go-autorest => github.com/Azure/go-autorest v13.0.1+incompatible
github.com/census-instrumentation/opencensus-proto => github.com/census-instrumentation/opencensus-proto v0.2.1
github.com/go-macaron/cors => github.com/go-macaron/cors v0.0.0-20190418220122-6fd6a9bfe14e

// https://github.com/timakin/bodyclose/pull/20
github.com/timakin/bodyclose => github.com/golangci/bodyclose v0.0.0-20190924091105-43b3ff1b0de0

Expand Down
826 changes: 2 additions & 824 deletions go.sum

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions tools/go.mod
@@ -0,0 +1,12 @@
module github.com/golangci/golangci-lint/tools

go 1.12

require (
github.com/goreleaser/godownloader v0.0.0-20190924012648-96e3b3dd514b
github.com/goreleaser/goreleaser v0.118.1
)

// Fix godownloader/goreleaser deps (ambiguous imports/invalid pseudo-version)
// https://github.com/goreleaser/goreleaser/issues/1145
replace github.com/go-macaron/cors => github.com/go-macaron/cors v0.0.0-20190418220122-6fd6a9bfe14e
145 changes: 20 additions & 125 deletions ...r/github.com/goreleaser/goreleaser/go.sum → tools/go.sum

Large diffs are not rendered by default.

File renamed without changes.
202 changes: 0 additions & 202 deletions vendor/cloud.google.com/go/LICENSE

This file was deleted.

0 comments on commit c427c61

Please sign in to comment.