Version 0.2.4
* Notifications now display errors and the output of the failed command. * CI configs for GitHub and Woodpecker * Added `version` subcommand * Console logging can be disabled by setting `console-disabled` in the `logging` object * If Host was not defined for an incomplete `hosts` object, any commands would fail as they could not look up the values in the SSH config files.
This commit is contained in:
25
cmd/version.go
Normal file
25
cmd/version.go
Normal file
@ -0,0 +1,25 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
const versionStr = "0.2.4"
|
||||
|
||||
var (
|
||||
versionCmd = &cobra.Command{
|
||||
Use: "version",
|
||||
Short: "Prints the version and exits.",
|
||||
Run: version,
|
||||
}
|
||||
)
|
||||
|
||||
func version(cmd *cobra.Command, args []string) {
|
||||
|
||||
fmt.Printf("v%s\n", versionStr)
|
||||
|
||||
os.Exit(0)
|
||||
}
|
Reference in New Issue
Block a user