Fix version display

This commit is contained in:
yo 2022-07-10 14:16:39 +02:00
parent 484e05e8d1
commit e13437b79e

View File

@ -14,7 +14,7 @@ import (
)
const (
gVersion = "0.27e"
gVersion = "0.28a"
// TODO : Get from $jail_zpool/defaults.json
MIN_DYN_DEVFS_RULESET = 1000
@ -55,7 +55,8 @@ var (
Long: `GoCage is a jail management tool. It support VNET, host-only, NAT networks. Provides snapshots and cloning.
It support iocage jails and can coexist with iocage.`,
Run: func(cmd *cobra.Command, args []string) {
fmt.Printf("GoCage v.%s on FreeBSD %.1f\n", gVersion, gHostVersion)
fv, _ := getFreeBSDVersion()
fmt.Printf("GoCage v.%s on FreeBSD %d.%d-%s\n", gVersion, fv.major, fv.minor, fv.flavor)
fmt.Printf("Use -h flag to display help\n")
},
}
@ -65,7 +66,8 @@ It support iocage jails and can coexist with iocage.`,
Short: "Print the version number of GoCage",
Long: `Let this show you how much fail I had to get this *cough* perfect`,
Run: func(cmd *cobra.Command, args []string) {
fmt.Printf("GoCage v.%s on FreeBSD %.1f\n", gVersion, gHostVersion)
fv, _ := getFreeBSDVersion()
fmt.Printf("GoCage v.%s on FreeBSD %d.%d-%s\n", gVersion, fv.major, fv.minor, fv.flavor)
},
}
@ -106,7 +108,6 @@ ex: gocage list srv-db srv-web`,
Run: func(cmd *cobra.Command, args []string) {
// Load inventory
ListJails(args, false)
StartJail(args)
WriteConfigToDisk(false)
},