updated info/version prints

mine
derailed 2019-03-26 10:23:33 -06:00
commit 6a10c94e6c
4 changed files with 54 additions and 17 deletions

View File

@ -60,16 +60,16 @@ brew:
test: |
system "k9s version"
# Snap
# Snapcraft
snapcraft:
name: k9s
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
publish: true
replacements:
amd64: 64-bit
386: 32-bit
darwin: macOS
linux: Tux
publish: false
summary: K9s is a CLI to view and manage your Kubernetes clusters.
description: |
K9s is a CLI to view and manage your Kubernetes clusters.

View File

@ -0,0 +1,26 @@
# Release v0.3.3
## Notes
Thank you to all that contributed with flushing out issues with K9s! I'll try
to mark some of these issues as fixed. But if you don't mind grab the latest
rev and see if we're happier with some of the fixes!
If you've filed an issue please help me verify and close.
Thank you so much for your support!!
---
## Change Logs
1. [Feature #131](https://github.com/derailed/k9s/issues/131)
Preliminary support for snapcraft builds ie read trying this out...
2. [Feature #118](https://github.com/derailed/k9s/issues/118) Add arm 32/64 bit builds.
NOTE: will need help vetting this out as my rpi cluster is currently down.
---
## Resolved Bugs
+ [Feature #132](https://github.com/derailed/k9s/issues/132). With feelings!

View File

@ -12,7 +12,7 @@ import (
func infoCmd() *cobra.Command {
return &cobra.Command{
Use: "info",
Short: "Print configuration information",
Short: "Print configuration info",
Long: "Print configuration information",
Run: func(cmd *cobra.Command, args []string) {
printInfo()
@ -21,13 +21,16 @@ func infoCmd() *cobra.Command {
}
func printInfo() {
const secFmt = "%-15s "
printLogo()
printTuple(secFmt, "Configuration", config.K9sConfigFile)
printTuple(secFmt, "Logs", config.K9sLogs)
}
func printLogo() {
for _, l := range views.LogoSmall {
fmt.Println(printer.Colorize(l, printer.ColorCyan))
}
fmt.Println()
fmt.Printf(printer.Colorize(fmt.Sprintf("%-15s", "Configuration:"), printer.ColorCyan))
fmt.Println(printer.Colorize(config.K9sConfigFile, printer.ColorWhite))
fmt.Printf(printer.Colorize(fmt.Sprintf("%-15s", "Logs:"), printer.ColorCyan))
fmt.Println(printer.Colorize(config.K9sLogs, printer.ColorWhite))
}

View File

@ -10,16 +10,24 @@ import (
func versionCmd() *cobra.Command {
return &cobra.Command{
Use: "version",
Short: "Print version info",
Long: "Prints version info",
Short: "Print version/build info",
Long: "Print version/build information",
Run: func(cmd *cobra.Command, args []string) {
const secFmt = "%-10s"
fmt.Printf(printer.Colorize(fmt.Sprintf(secFmt, "Version:"), printer.ColorMagenta))
fmt.Println(printer.Colorize(version, printer.ColorDarkGray))
fmt.Printf(printer.Colorize(fmt.Sprintf(secFmt, "Commit:"), printer.ColorMagenta))
fmt.Println(printer.Colorize(commit, printer.ColorDarkGray))
fmt.Printf(printer.Colorize(fmt.Sprintf(secFmt, "Date:"), printer.ColorMagenta))
fmt.Println(printer.Colorize(date, printer.ColorDarkGray))
printVersion()
},
}
}
func printVersion() {
const secFmt = "%-10s "
printLogo()
printTuple(secFmt, "Version", version)
printTuple(secFmt, "Commit", commit)
printTuple(secFmt, "Date", date)
}
func printTuple(format, section, value string) {
fmt.Printf(printer.Colorize(fmt.Sprintf(format, section+":"), printer.ColorCyan))
fmt.Println(printer.Colorize(value, printer.ColorWhite))
}