Skip to content

Commit

Permalink
#26
Browse files Browse the repository at this point in the history
  • Loading branch information
ufasoli committed Jul 27, 2020
1 parent 8af717c commit 98ecfca
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
11 changes: 9 additions & 2 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,18 @@ var Verbose bool

const containerName = "platys"
const configFilePath = "/opt/mdps-gen/vars/config.yml"
const version = "2.3.0"

var versionInfo = fmt.Sprintf(
`Platys - Trivadis Platform in a Box - v %v
https://github.com/trivadispf/platys
Copyright (c) 2018-2020, Trivadis AG`,
version)

var rootCmd = &cobra.Command{
Use: "platys",
Short: "Platys platform generator",
Long: `Platys modern data platform generator
Complete documentation is available at https://github.com/TrivadisPF/platys`,
Long: versionInfo,
Run: func(cmd *cobra.Command, args []string) {
if len(args) == 0 { // no argument provided invoke help command
cmd.Help()
Expand All @@ -40,6 +46,7 @@ func init() {
rootCmd.PersistentFlags().StringVarP(&Stack, "stack", "s", "trivadis/platys-modern-data-platform", "stack version to employ")
rootCmd.PersistentFlags().StringVarP(&Version, "stack-version", "w", "latest", "version of the stack to employ")
rootCmd.PersistentFlags().BoolVarP(&Verbose, "verbose", "v", true, "verbose output")

}

func Execute() {
Expand Down
8 changes: 7 additions & 1 deletion cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ var versionCmd = &cobra.Command{
Short: "Print the version number of platys",
Long: `Print the version number of platys`,
Run: func(cmd *cobra.Command, args []string) {
fmt.Println("Platys v 1.0")
versionInfo := fmt.Sprintf(
`Platys - Trivadis Platform in a Box - v %v
https://github.com/trivadispf/platys
Copyright (c) 2018-2020, Trivadis AG`,
version)

fmt.Println(versionInfo)
},
}

0 comments on commit 98ecfca

Please sign in to comment.