diff --git a/cmd/microcloud/main.go b/cmd/microcloud/main.go index 6b8b92b54..713cda222 100644 --- a/cmd/microcloud/main.go +++ b/cmd/microcloud/main.go @@ -68,7 +68,7 @@ EOF`) app := &cobra.Command{ Use: "microcloud", Short: "Command for managing the MicroCloud daemon", - Version: version.Version, + Version: version.VersionWithLTS(), SilenceUsage: true, CompletionOptions: cobra.CompletionOptions{DisableDefaultCmd: true}, PersistentPreRun: func(cmd *cobra.Command, args []string) { diff --git a/cmd/microcloudd/main.go b/cmd/microcloudd/main.go index 7d4f078ce..b86c701b3 100644 --- a/cmd/microcloudd/main.go +++ b/cmd/microcloudd/main.go @@ -49,7 +49,7 @@ func (c *cmdDaemon) Command() *cobra.Command { cmd := &cobra.Command{ Use: "microcloudd", Short: "MicroCloud daemon", - Version: version.Version, + Version: version.VersionWithLTS(), } cmd.RunE = c.Run diff --git a/version/version.go b/version/version.go index 3b548a085..096f56385 100644 --- a/version/version.go +++ b/version/version.go @@ -1,5 +1,21 @@ // Package version provides shared version information. package version +import ( + "fmt" +) + // Version is the current version of MicroCloud. -const Version = "1.1" +const Version = "2.1" + +// LTS should be set if the current version is an LTS (long-term support) version. +const LTS = true + +// VersionWithLTS appends "LTS" to the version string if MicroCloud is an LTS version. +func VersionWithLTS() string { + if LTS { + return fmt.Sprintf("%s LTS", Version) + } + + return Version +}