diff options
author | 2021-06-28 12:17:20 +0200 | |
---|---|---|
committer | 2021-06-28 12:17:20 +0200 | |
commit | 4f3b3f5c0b00b8c47c7e7d8e6c2dda624e114cde (patch) | |
tree | af7583b906543148fcd00c2e4e3bf0525f03be18 /internal/config/config.go | |
parent | Remote instance dereferencing (#70) (diff) | |
download | gotosocial-4f3b3f5c0b00b8c47c7e7d8e6c2dda624e114cde.tar.xz |
put version in binary properly (#73)
Addresses #71 :
Set version on the CLI framework.
Add a build.sh script that injects variables into the build tooling using git and a version file.
Set version in config.
Diffstat (limited to 'internal/config/config.go')
-rw-r--r-- | internal/config/config.go | 4 |
1 files changed, 3 insertions, 1 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 } |