Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLOUDP-65942: Add auto complete to brew installer #220

Merged
merged 1 commit into from
Jun 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,14 @@ brews:
owner: mongodb
name: homebrew-brew
folder: Formula
skip_upload: false
skip_upload: auto
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just checking, so this means it will skip uploading rc's but will upload the tags?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rcs, betas, alpha, and such, we disabled this when we were doing our rc, so going back to not publishing unstable

description: The MongoDB Command Line Interface (mongocli) is a tool for managing your MongoDB cloud services, like MongoDB Atlas, MongoDB Cloud Manager, and MongoDB Ops Manager.
homepage: https://github.com/mongodb/mongocli
install: |
bin.install "mongocli"
(bash_completion/"mongocli.sh").write `#{bin}/mongocli completion bash`
(zsh_completion/"_mongocli").write `#{bin}/mongocli completion zsh`
(fish_completion/"mongocli.fish").write `#{bin}/mongocli completion fish`
test: |
system "#{bin}/mongocli --version"
nfpms:
Expand Down
5 changes: 4 additions & 1 deletion cmd/mongocli/mongocli.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ var (
Short: "Generate shell completion scripts",
Long: `Generate shell completion scripts for MongoDB CLI commands.
The output of this command will be computer code and is meant to be saved to a
file or immediately evaluated by an interactive shell.`,
file or immediately evaluated by an interactive shell.

When installing MongoDB CLI through brew, it's possible that
no additional shell configuration is necessary, see https://docs.brew.sh/Shell-Completion.`,
ValidArgs: []string{"bash", "zsh", "powershell", "fish"},
RunE: func(cmd *cobra.Command, args []string) error {
switch args[0] {
Expand Down