Files
atlantis/cmd/version.go
Luke Kysow d425de95fa Refactoring
* 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
2017-06-17 14:14:21 -07:00

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)
}