Assign default number version (without patch version)

So that you can still build and use fzf even when the precise version
number is not injected via -ldflags.
This commit is contained in:
Junegunn Choi 2020-10-29 01:36:55 +09:00
parent 569be4c6c9
commit b5e0e29ec6
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627
1 changed files with 2 additions and 5 deletions

View File

@ -5,13 +5,10 @@ import (
"github.com/junegunn/fzf/src/protector"
)
var version string
var revision string
var version string = "0.24"
var revision string = "devel"
func main() {
if len(version) == 0 {
panic("Invalid build: version information missing")
}
protector.Protect()
fzf.Run(fzf.ParseOptions(), version, revision)
}