mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 16:52:25 -05:00
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.
This commit is contained in:
parent
87cf621e21
commit
4f3b3f5c0b
9 changed files with 38 additions and 11 deletions
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue