Skip to content

Commit

Permalink
version: Release MicroCloud 2.1 LTS
Browse files Browse the repository at this point in the history
Signed-off-by: Max Asnaashari <max.asnaashari@canonical.com>
  • Loading branch information
masnax committed Oct 22, 2024
1 parent 1ada833 commit 8e6d7bd
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/microcloud/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/microcloudd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 17 additions & 1 deletion version/version.go
Original file line number Diff line number Diff line change
@@ -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 {

Check failure on line 15 in version/version.go

View workflow job for this annotation

GitHub Actions / Code

func name will be used as version.VersionWithLTS by other packages, and that stutters; consider calling this WithLTS
if LTS {
return fmt.Sprintf("%s LTS", Version)
}

return Version
}

0 comments on commit 8e6d7bd

Please sign in to comment.