mirror of
https://github.com/passbolt/go-passbolt-cli.git
synced 2025-07-13 05:09:09 +00:00
Use goreleaser version if available, otherwise buildinfo
This commit is contained in:
parent
b269e8538d
commit
b48f3274e6
3 changed files with 48 additions and 6 deletions
|
@ -121,6 +121,10 @@ func initConfig() {
|
|||
}
|
||||
}
|
||||
|
||||
func SetVersionInfo(version, commit, date string) {
|
||||
rootCmd.Version = fmt.Sprintf("%s (Built on %s from Git SHA %s)", version, date, commit)
|
||||
func SetVersionInfo(version, commit, date string, dirty bool) {
|
||||
v := fmt.Sprintf("%s (Built on %s from Git SHA %s)", version, date, commit)
|
||||
if dirty {
|
||||
v = v + " dirty"
|
||||
}
|
||||
rootCmd.Version = v
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue