Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

Commit

Permalink
make version a link time variable
Browse files Browse the repository at this point in the history
  • Loading branch information
shrouxm committed Apr 16, 2020
1 parent f73ee8e commit 6057f7e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ builds:
main: ./cmd/lsif-go/
binary: lsif-go
ldflags:
- -X main.buildTag={{.Version}}
- -X main.version={{.Version}}
goos:
- linux
- windows
Expand Down
4 changes: 2 additions & 2 deletions cmd/lsif-go/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ import (
"github.com/sourcegraph/lsif-go/protocol"
)

const version = "0.5.1"
const versionString = version + ", protocol version " + protocol.Version
var version string

func init() {
log.SetFlags(0)
Expand All @@ -42,6 +41,7 @@ func realMain() error {
addContents bool
)

versionString := version + ", protocol version " + protocol.Version
app := kingpin.New("lsif-go", "lsif-go is an LSIF indexer for Go.").Version(versionString)
app.HelpFlag.Short('h')
app.VersionFlag.Short('v')
Expand Down

0 comments on commit 6057f7e

Please sign in to comment.