summaryrefslogtreecommitdiffstats
path: root/main.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2018-08-19 20:04:57 +1000
committerJesse Duffield <jessedduffield@gmail.com>2018-08-19 20:04:57 +1000
commit20086071088fb59be68a1d752147dcd00e541395 (patch)
tree480376025517011e3ee282ee2a2f891945819324 /main.go
parent21be9fb3b13802573361da6384a0b8bcc3aeb71f (diff)
remove VERSION file
Diffstat (limited to 'main.go')
-rw-r--r--main.go16
1 files changed, 0 insertions, 16 deletions
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)