mirror of
https://git.vectorsigma.ru/public/atlantis.git
synced 2026-08-02 15:48:34 +00:00
* set version in one place * rename ExecutionContext to CommandContext * delete unneeded PullRequestContext since it just duplicated what is in CommandContext * split fields inside CommandContext into Repo, PullRequest, and User models * clean up unused fields * remove base_executor stuff which was trying to do inheritance in go and didn't get us anywhere * clean up unused code and assets * created a locking.Client that creates the Keys that are used on the front-end. This allows the backends to store the locks any way they like as long as they support the interface
20 lines
337 B
Go
20 lines
337 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)
|
|
}
|