diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2018-08-19 20:04:57 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2018-08-19 20:04:57 +1000 |
commit | 20086071088fb59be68a1d752147dcd00e541395 (patch) | |
tree | 480376025517011e3ee282ee2a2f891945819324 /main.go | |
parent | 21be9fb3b13802573361da6384a0b8bcc3aeb71f (diff) |
remove VERSION file
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 16 |
1 files changed, 0 insertions, 16 deletions
@@ -3,7 +3,6 @@ package main import ( "flag" "fmt" - "io/ioutil" "os" "path/filepath" "runtime" @@ -26,23 +25,8 @@ func projectPath(path string) string { return filepath.FromSlash(gopath + "/src/github.com/jesseduffield/lazygit/" + path) } -// when building the binary, `version` is set as a compile-time variable, along -// with `date` and `commit`. If this program has been opened directly via go, -// we will populate the `version` with VERSION in the lazygit root directory -func fallbackVersion() string { - path := projectPath("VERSION") - byteVersion, err := ioutil.ReadFile(path) - if err != nil { - return "unversioned" - } - return string(byteVersion) -} - func main() { flag.Parse() - if version == "unversioned" { - version = fallbackVersion() - } if *versionFlag { fmt.Printf("commit=%s, build date=%s, version=%s, os=%s, arch=%s\n", commit, date, version, runtime.GOOS, runtime.GOARCH) os.Exit(0) |