docs: #377: simplify local installation manual

This commit is contained in:
Denis Isaev 2019-01-26 18:55:29 +03:00
parent 3e9b681cf0
commit e690feb36b
No known key found for this signature in database
GPG Key ID: A36A0EC8E27A1A01
2 changed files with 28 additions and 6 deletions

View File

@ -90,13 +90,13 @@ update if needed.
Local installation is not recommended for your CI pipeline. Only install the linter this way in a local development environment.
#### Windows, MacOS and Linux
```bash
go get -u github.com/golangci/golangci-lint/cmd/golangci-lint
cd $(go env GOPATH)/src/github.com/golangci/golangci-lint/cmd/golangci-lint
go install -ldflags "-X 'main.version=$(git describe --tags)' -X 'main.commit=$(git rev-parse --short HEAD)' -X 'main.date=$(date)'"
```
(On Windows, you can run the above commands with Git Bash, which comes with [Git for Windows](https://git-scm.com/download/win). Or you can run just `go get -u github.com/golangci/golangci-lint/cmd/golangci-lint`.)
#### MacOS
You can also install it on MacOS using [brew](https://brew.sh/):
@ -105,6 +105,17 @@ brew install golangci/tap/golangci-lint
brew upgrade golangci/tap/golangci-lint
```
#### `--version`
If you need your local `golangci-lint --version` to show proper version additionally run:
```bash
cd $(go env GOPATH)/src/github.com/golangci/golangci-lint/cmd/golangci-lint
go install -ldflags "-X 'main.version=$(git describe --tags)' -X 'main.commit=$(git rev-parse --short HEAD)' -X 'main.date=$(date)'"
```
(On Windows, you can run the above commands with Git Bash, which comes with [Git for Windows](https://git-scm.com/download/win).
## Trusted By
The following companies/products use golangci-lint:

View File

@ -90,13 +90,13 @@ update if needed.
Local installation is not recommended for your CI pipeline. Only install the linter this way in a local development environment.
#### Windows, MacOS and Linux
```bash
go get -u github.com/golangci/golangci-lint/cmd/golangci-lint
cd $(go env GOPATH)/src/github.com/golangci/golangci-lint/cmd/golangci-lint
go install -ldflags "-X 'main.version=$(git describe --tags)' -X 'main.commit=$(git rev-parse --short HEAD)' -X 'main.date=$(date)'"
```
(On Windows, you can run the above commands with Git Bash, which comes with [Git for Windows](https://git-scm.com/download/win). Or you can run just `go get -u github.com/golangci/golangci-lint/cmd/golangci-lint`.)
#### MacOS
You can also install it on MacOS using [brew](https://brew.sh/):
@ -105,6 +105,17 @@ brew install golangci/tap/golangci-lint
brew upgrade golangci/tap/golangci-lint
```
#### `--version`
If you need your local `golangci-lint --version` to show proper version additionally run:
```bash
cd $(go env GOPATH)/src/github.com/golangci/golangci-lint/cmd/golangci-lint
go install -ldflags "-X 'main.version=$(git describe --tags)' -X 'main.commit=$(git rev-parse --short HEAD)' -X 'main.date=$(date)'"
```
(On Windows, you can run the above commands with Git Bash, which comes with [Git for Windows](https://git-scm.com/download/win).
## Trusted By
The following companies/products use golangci-lint: