Skip to content

Commit

Permalink
Handle case where version is not knowable
Browse files Browse the repository at this point in the history
  • Loading branch information
edmc-ss committed Mar 1, 2024
1 parent d57d9b6 commit b1c6e34
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions version/static-data/make_static_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,18 @@ func main() {
}
_, err = dstFile.Write([]byte(fmt.Sprintf("package %v\n\n", packageName)))
if nil != err {
panic(err.Error())
}
gitDescribeCmd = exec.Command("git", "describe", "--tags")

gitDescribeCmd = exec.Command("git", "describe", "--tags")
gitDescribeOutput, err = gitDescribeCmd.Output()
if nil != err {
panic(err.Error())
}

gitDescribeOutput, err = gitDescribeCmd.Output()
if nil != err {
panic(err.Error())
proxyfsVersionString = string(gitDescribeOutput[:len(gitDescribeOutput)-1])
} else {
proxyfsVersionString = "unknown"
}

proxyfsVersionString = string(gitDescribeOutput[:len(gitDescribeOutput)-1])

_, err = dstFile.Write([]byte(fmt.Sprintf("const ProxyFSVersion = `%v`\n", proxyfsVersionString)))
if nil != err {
panic(err.Error())
Expand Down

0 comments on commit b1c6e34

Please sign in to comment.