Skip to content

Commit 645e794

Browse files
committed
docs: update the latest release to v1.21.0
1 parent df27992 commit 645e794

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,19 +71,19 @@ use deprecated option `--enable-all` and a new linter is added or even without `
7171
It's highly recommended to install a fixed version of golangci-lint.
7272
Releases are available on the [releases page](https://github.com/golangci/golangci-lint/releases).
7373

74-
Latest version: [v1.20.0](https://github.com/golangci/golangci-lint/releases/tag/v1.20.0)
74+
Latest version: [v1.21.0](https://github.com/golangci/golangci-lint/releases/tag/v1.21.0)
7575

7676
Here is the recommended way to install golangci-lint:
7777

7878
```bash
7979
# binary will be $(go env GOPATH)/bin/golangci-lint
80-
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $(go env GOPATH)/bin v1.20.0
80+
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $(go env GOPATH)/bin v1.21.0
8181

8282
# or install it into ./bin/
83-
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s v1.20.0
83+
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s v1.21.0
8484

8585
# In alpine linux (as it does not come with curl by default)
86-
wget -O - -q https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s v1.20.0
86+
wget -O - -q https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s v1.21.0
8787

8888
golangci-lint --version
8989
```
@@ -104,7 +104,7 @@ brew upgrade golangci/tap/golangci-lint
104104
### By Docker
105105

106106
```bash
107-
docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint:v1.20.0 golangci-lint run -v
107+
docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint:v1.21.0 golangci-lint run -v
108108
```
109109

110110
### go get

scripts/gen_readme/main.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ func genReadme(tmplPath, outPath string) error {
4343
}
4444

4545
func getLatestVersion() (string, error) {
46+
if gitTag := os.Getenv("GIT_TAG"); gitTag != "" {
47+
return gitTag, nil
48+
}
49+
4650
out, err := exec.Command("git", "tag", "-l", "--sort=-v:refname").Output()
4751
if err != nil {
4852
return "", fmt.Errorf("failed to run git tag: %s", err)

0 commit comments

Comments
 (0)