Skip to content

Use separate go.mod/go.sum to manage tool deps #736

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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.

Loading