diff options
Diffstat (limited to 'internal/config')
-rw-r--r-- | internal/config/config.go | 4 | ||||
-rw-r--r-- | internal/config/default.go | 4 |
2 files changed, 3 insertions, 5 deletions
diff --git a/internal/config/config.go b/internal/config/config.go index 3705c364f..28bbc8542 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -106,7 +106,7 @@ func loadFromFile(path string) (*Config, error) { } // ParseCLIFlags sets flags on the config using the provided Flags object -func (c *Config) ParseCLIFlags(f KeyedFlags) error { +func (c *Config) ParseCLIFlags(f KeyedFlags, version string) error { fn := GetFlagNames() // For all of these flags, we only want to set them on the config if: @@ -261,6 +261,8 @@ func (c *Config) ParseCLIFlags(f KeyedFlags) error { c.AccountCLIFlags[EmailFlag] = f.String(EmailFlag) c.AccountCLIFlags[PasswordFlag] = f.String(PasswordFlag) + c.SoftwareVersion = version + return nil } diff --git a/internal/config/default.go b/internal/config/default.go index 2cc46c996..40df4c57e 100644 --- a/internal/config/default.go +++ b/internal/config/default.go @@ -1,7 +1,5 @@ package config -const softwareVersion = "0.1.0-SNAPSHOT" - // TestDefault returns a default config for testing func TestDefault() *Config { defaults := GetTestDefaults() @@ -121,7 +119,6 @@ func GetDefaults() Defaults { ConfigPath: "", Host: "", Protocol: "https", - SoftwareVersion: softwareVersion, DbType: "postgres", DbAddress: "localhost", @@ -168,7 +165,6 @@ func GetTestDefaults() Defaults { ConfigPath: "", Host: "localhost:8080", Protocol: "http", - SoftwareVersion: softwareVersion, DbType: "postgres", DbAddress: "localhost", |