put version in binary properly

This commit is contained in:
tsmethurst 2021-06-28 12:14:54 +02:00
commit daa96eb247
9 changed files with 36 additions and 10 deletions

View file

@ -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
}