diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2022-08-01 20:04:22 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2022-08-01 20:16:50 +1000 |
commit | 86ac309e08f940bfe5be8a3a7bf0e5288786bee9 (patch) | |
tree | b267377e1b5b5104db019cdb285d47957aebec56 /pkg/config | |
parent | 69f4292fe3d0d3422a193a0669c1ed0d41883b41 (diff) |
add build info when building from source
Diffstat (limited to 'pkg/config')
-rw-r--r-- | pkg/config/app_config.go | 16 | ||||
-rw-r--r-- | pkg/config/dummies.go | 13 |
2 files changed, 5 insertions, 24 deletions
diff --git a/pkg/config/app_config.go b/pkg/config/app_config.go index 883d0d030..3591166c7 100644 --- a/pkg/config/app_config.go +++ b/pkg/config/app_config.go @@ -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 } diff --git a/pkg/config/dummies.go b/pkg/config/dummies.go index bd973909a..08150c765 100644 --- a/pkg/config/dummies.go +++ b/pkg/config/dummies.go @@ -7,14 +7,11 @@ import ( // NewDummyAppConfig creates a new dummy AppConfig for testing func NewDummyAppConfig() *AppConfig { appConfig := &AppConfig{ - Name: "lazygit", - Version: "unversioned", - Commit: "", - BuildDate: "", - Debug: false, - BuildSource: "", - UserConfig: GetDefaultConfig(), - AppState: &AppState{}, + Name: "lazygit", + Version: "unversioned", + Debug: false, + UserConfig: GetDefaultConfig(), + AppState: &AppState{}, } _ = yaml.Unmarshal([]byte{}, appConfig.AppState) return appConfig |