From 20086071088fb59be68a1d752147dcd00e541395 Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Sun, 19 Aug 2018 20:04:57 +1000 Subject: remove VERSION file --- main.go | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'main.go') diff --git a/main.go b/main.go index b8b9af931..e8c092da2 100644 --- a/main.go +++ b/main.go @@ -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) -- cgit v1.2.3