Skip to content

Commit e690feb

Browse files
committed
docs: #377: simplify local installation manual
1 parent 3e9b681 commit e690feb

File tree

2 files changed

+28
-6
lines changed

2 files changed

+28
-6
lines changed

README.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,13 @@ update if needed.
9090

9191
Local installation is not recommended for your CI pipeline. Only install the linter this way in a local development environment.
9292

93+
#### Windows, MacOS and Linux
94+
9395
```bash
9496
go get -u github.com/golangci/golangci-lint/cmd/golangci-lint
95-
cd $(go env GOPATH)/src/github.com/golangci/golangci-lint/cmd/golangci-lint
96-
go install -ldflags "-X 'main.version=$(git describe --tags)' -X 'main.commit=$(git rev-parse --short HEAD)' -X 'main.date=$(date)'"
9797
```
9898

99-
(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`.)
99+
#### MacOS
100100

101101
You can also install it on MacOS using [brew](https://brew.sh/):
102102

@@ -105,6 +105,17 @@ brew install golangci/tap/golangci-lint
105105
brew upgrade golangci/tap/golangci-lint
106106
```
107107

108+
#### `--version`
109+
110+
If you need your local `golangci-lint --version` to show proper version additionally run:
111+
112+
```bash
113+
cd $(go env GOPATH)/src/github.com/golangci/golangci-lint/cmd/golangci-lint
114+
go install -ldflags "-X 'main.version=$(git describe --tags)' -X 'main.commit=$(git rev-parse --short HEAD)' -X 'main.date=$(date)'"
115+
```
116+
117+
(On Windows, you can run the above commands with Git Bash, which comes with [Git for Windows](https://git-scm.com/download/win).
118+
108119
## Trusted By
109120

110121
The following companies/products use golangci-lint:

README.tmpl.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,13 @@ update if needed.
9090

9191
Local installation is not recommended for your CI pipeline. Only install the linter this way in a local development environment.
9292

93+
#### Windows, MacOS and Linux
94+
9395
```bash
9496
go get -u github.com/golangci/golangci-lint/cmd/golangci-lint
95-
cd $(go env GOPATH)/src/github.com/golangci/golangci-lint/cmd/golangci-lint
96-
go install -ldflags "-X 'main.version=$(git describe --tags)' -X 'main.commit=$(git rev-parse --short HEAD)' -X 'main.date=$(date)'"
9797
```
9898

99-
(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`.)
99+
#### MacOS
100100

101101
You can also install it on MacOS using [brew](https://brew.sh/):
102102

@@ -105,6 +105,17 @@ brew install golangci/tap/golangci-lint
105105
brew upgrade golangci/tap/golangci-lint
106106
```
107107

108+
#### `--version`
109+
110+
If you need your local `golangci-lint --version` to show proper version additionally run:
111+
112+
```bash
113+
cd $(go env GOPATH)/src/github.com/golangci/golangci-lint/cmd/golangci-lint
114+
go install -ldflags "-X 'main.version=$(git describe --tags)' -X 'main.commit=$(git rev-parse --short HEAD)' -X 'main.date=$(date)'"
115+
```
116+
117+
(On Windows, you can run the above commands with Git Bash, which comes with [Git for Windows](https://git-scm.com/download/win).
118+
108119
## Trusted By
109120

110121
The following companies/products use golangci-lint:

0 commit comments

Comments
 (0)