mirror of
https://git.vectorsigma.ru/public/atlantis.git
synced 2026-07-29 18:38:33 +00:00
* Return error if workspace doesn't exist * Default data dir to ~/.atlantis. Don't clean workspaces * Run goimports
21 lines
338 B
Go
21 lines
338 B
Go
package cmd
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/spf13/cobra"
|
|
"github.com/spf13/viper"
|
|
)
|
|
|
|
var versionCmd = &cobra.Command{
|
|
Use: "version",
|
|
Short: "Print the current Atlantis version",
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
fmt.Printf("atlantis %s\n", viper.Get("version"))
|
|
},
|
|
}
|
|
|
|
func init() {
|
|
RootCmd.AddCommand(versionCmd)
|
|
}
|