Use git describe --tags
to get most recent tag reachable from HEAD
This commit is contained in:
parent
84c9c65f39
commit
89b7e42dbf
@ -92,7 +92,7 @@ It's a not recommended for your CI pipeline. Only install like this for your loc
|
||||
```bash
|
||||
go get -u github.com/golangci/golangci-lint
|
||||
cd $GOPATH/src/github.com/golangci/golangci-lint/cmd/golangci-lint
|
||||
go install -ldflags "-X 'main.version=$(git rev-parse --abbrev-ref HEAD)' -X 'main.commit=$(git rev-parse --short HEAD)' -X 'main.date=$(date)'"
|
||||
go install -ldflags "-X 'main.version=$(git describe --tags)' -X 'main.commit=$(git rev-parse --short HEAD)' -X 'main.date=$(date)'"
|
||||
```
|
||||
|
||||
You can also install it on OSX using brew:
|
||||
|
@ -92,7 +92,7 @@ It's a not recommended for your CI pipeline. Only install like this for your loc
|
||||
```bash
|
||||
go get -u github.com/golangci/golangci-lint
|
||||
cd $GOPATH/src/github.com/golangci/golangci-lint/cmd/golangci-lint
|
||||
go install -ldflags "-X 'main.version=$(git rev-parse --abbrev-ref HEAD)' -X 'main.commit=$(git rev-parse --short HEAD)' -X 'main.date=$(date)'"
|
||||
go install -ldflags "-X 'main.version=$(git describe --tags)' -X 'main.commit=$(git rev-parse --short HEAD)' -X 'main.date=$(date)'"
|
||||
```
|
||||
|
||||
You can also install it on OSX using brew:
|
||||
|
Loading…
x
Reference in New Issue
Block a user