mirror of
https://git.vectorsigma.ru/public/atlantis.git
synced 2026-08-04 03:28:32 +00:00
* added new flags `plan-backend`, `plan-s3-bucket`, `plan-s3-prefix` and deleted `s3-bucket` * interface `plan.Backend` that is implemented by `file` and `s3` * simplified s3 code * didn't end up following my suggestions in #30 since storing stuff in metadata requires you to `Get` the object *first* and then use the metadata. By parsing the `Key` to get repo, pull, path, and env, it skips an initial `Get` step, and I can download directly to the correct directory * allow users to specify `application/json` or `application/x-www-form-urlencoded` for the webhook delivery type * remove sending of special header for pull request api (fixes #11) Closes #30 and #17 and #11
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)
|
|
}
|