1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-11-29 22:48:24 +02:00

add build info when building from source

This commit is contained in:
Jesse Duffield
2022-08-01 20:04:22 +10:00
parent 69f4292fe3
commit 86ac309e08
8 changed files with 56 additions and 40 deletions

View File

@@ -15,7 +15,6 @@ import (
type AppConfig struct {
Debug bool `long:"debug" env:"DEBUG" default:"false"`
Version string `long:"version" env:"VERSION" default:"unversioned"`
Commit string `long:"commit" env:"COMMIT"`
BuildDate string `long:"build-date" env:"BUILD_DATE"`
Name string `long:"name" env:"NAME" default:"lazygit"`
BuildSource string `long:"build-source" env:"BUILD_SOURCE" default:""`
@@ -35,8 +34,6 @@ type AppConfigurer interface {
// build info
GetVersion() string
GetCommit() string
GetBuildDate() string
GetName() string
GetBuildSource() string
@@ -80,10 +77,6 @@ func NewAppConfig(
return nil, err
}
if os.Getenv("DEBUG") == "TRUE" {
debuggingFlag = true
}
appState, err := loadAppState()
if err != nil {
return nil, err
@@ -92,7 +85,6 @@ func NewAppConfig(
appConfig := &AppConfig{
Name: name,
Version: version,
Commit: commit,
BuildDate: date,
Debug: debuggingFlag,
BuildSource: buildSource,
@@ -183,14 +175,6 @@ func (c *AppConfig) GetVersion() string {
return c.Version
}
func (c *AppConfig) GetCommit() string {
return c.Commit
}
func (c *AppConfig) GetBuildDate() string {
return c.BuildDate
}
func (c *AppConfig) GetName() string {
return c.Name
}