Skip to content

Commit 9efa1e2

Browse files
authored
CLOUDP-57869: Rename mcli to mongocli (#33)
1 parent 78bd58e commit 9efa1e2

File tree

98 files changed

+341
-300
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+341
-300
lines changed

.drone.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
kind: pipeline
33
type: docker
4-
name: mcli
4+
name: mongocli
55

66
platform:
77
os: linux

.github/pull_request_template.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!--
2-
Thanks for contributing to mcli!
2+
Thanks for contributing to MongoDB CLI!
33
4-
Before you submit your pull request, please be sure that you've reviewed our contributing guidelines: https://github.com/mongodb/mcli/blob/master/CONTRIBUTING.md
4+
Before you submit your pull request, please be sure that you've reviewed our contributing guidelines: https://github.com/mongodb/mongocli/blob/master/CONTRIBUTING.md
55
66
Please fill out the information below to help speed the review along, and hopefully
77
the merge of your pull request!
@@ -17,7 +17,7 @@ If it fixes a bug or resolves a feature request, be sure to link to that issue.
1717
_Jira ticket:_ [Name of ticket](https://jira.mongodb.org/browse/[name-of-ticket])
1818

1919
<!--
20-
What mcli issue does this PR address? (for example, #1234)
20+
What MongoDB CLI issue does this PR address? (for example, #1234), remove this section if none
2121
-->
2222

2323
Closes #[issue number]

.goreleaser.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ builds:
66
- env:
77
- CGO_ENABLED=0
88
ldflags:
9-
- -s -w -X github.com/mongodb/mcli/internal/version.Version={{.Version}}
9+
- -s -w -X github.com/mongodb/mongocli/internal/version.Version={{.Version}}
1010
goos:
1111
- darwin
1212
- linux
@@ -29,21 +29,21 @@ archives:
2929
- LICENSE
3030
- third_party_notices/**/*
3131
brews:
32-
- name: mcli
32+
- name: mongocli
3333
github:
3434
owner: mongodb-labs
35-
name: homebrew-mcli
36-
url_template: "https://github.com/mongodb/mcli/releases/{{ .Tag }}/{{ .ArtifactName }}"
35+
name: homebrew-mongocli
36+
url_template: "https://github.com/mongodb/mongocli/releases/{{ .Tag }}/{{ .ArtifactName }}"
3737
commit_author:
3838
name: gustavo.bazan
3939
40-
homepage: "https://github.com/mongodb/mcli"
40+
homepage: "https://github.com/mongodb/mongocli"
4141
description: "A tool to manage MongoDB Cloud."
4242
skip_upload: true
4343
test: |
44-
system "#{bin}/mcli --version"
44+
system "#{bin}/mongocli --version"
4545
install: |
46-
bin.install "mcli"
46+
bin.install "mongocli"
4747
checksum:
4848
name_template: 'checksums.txt'
4949
snapshot:

CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Contributing to the CLI
1+
# Contributing to MongoDB CLI
22

3-
Thanks for your interest in contributing to `mcli`,
3+
Thanks for your interest in contributing to `mongocli`,
44
this document describe the necessary steps to get a development environment going and the best way to contribute back to the project
55

66
## Development setup
@@ -36,9 +36,9 @@ If you need a new mock please add a reference on the [Make](Makefile) file and r
3636

3737
### Adding a new command
3838

39-
`mcli` uses [Cobra](https://github.com/spf13/cobra) as a framework for defining commands,
39+
`mongocli` uses [Cobra](https://github.com/spf13/cobra) as a framework for defining commands,
4040
in addition to this we have defined a basic structure that should be followed.
41-
For a `mcli scope newCommand` command a file `internal/cli/scope_new_command.go` should implement:
41+
For a `mongocli scope newCommand` command a file `internal/cli/scope_new_command.go` should implement:
4242
- A `ScopeNewCommandOpts` struct which handles the different options for the command.
4343
- At least a `func (opts *ScopeNewCommandOpts) Run() error` function with the main command logic.
4444
- A `func ScopeNewCommandBuilder() *cobra.Command` function to put together the expected cobra definition along with the `ScopeNewCommandOpts` logic.

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# A Self-Documenting Makefile: http://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
22

33
SOURCE_FILES?=./...
4-
BINARY_NAME=mcli
4+
BINARY_NAME=mongocli
55

66
DESTINATION=./bin/${BINARY_NAME}
77
GOLANGCI_VERSION=v1.23.3
88
COVERAGE=coverage.out
99

1010
VERSION=$(shell git describe --always --tags)
11-
LINKER_FLAGS=-X github.com/mongodb/mcli/internal/version.Version=${VERSION}
11+
LINKER_FLAGS=-X github.com/mongodb/mongocli/internal/version.Version=${VERSION}
1212

1313
export PATH := ./bin:$(PATH)
1414
export GO111MODULE := on
@@ -79,7 +79,7 @@ gen-notices: ## Generate 3rd party notices
7979
@echo "==> Generating 3rd party notices"
8080
@chmod -R 777 ./third_party_notices
8181
@rm -Rf third_party_notices
82-
go-licenses save "github.com/mongodb/mcli" --save_path=third_party_notices
82+
go-licenses save "github.com/mongodb/mongocli" --save_path=third_party_notices
8383

8484
.PHONY: release
8585
release: gen-notices ## Use goreleaser to generate builds and publish

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# MCLI
2-
[![Build Status](https://cloud.drone.io/api/badges/mongodb/mcli/status.svg)](https://cloud.drone.io/mongodb/mcli)
1+
# MongoDB CLI
2+
[![Build Status](https://cloud.drone.io/api/badges/mongodb/mongocli/status.svg)](https://cloud.drone.io/mongodb/mongocli)
33

4-
`mcli` is a tool for managing your MongoDB cloud services
4+
`mongocli` is a tool for managing your MongoDB cloud services
55

66
![Screenshot 2020-01-03 at 10 49 27](https://user-images.githubusercontent.com/461027/73472371-d6656480-4382-11ea-8bfb-535d91cf1fb4.png)
77

@@ -10,11 +10,11 @@
1010
## Hombrew on macOS
1111

1212
```bash
13-
brew install mongodb-labs/mcli/mcli
13+
brew install mongodb-labs/mongocli/mongocli
1414
```
1515

1616
## Pre-built Binaries
17-
Download the appropriate version for your platform from [mcli releases](https://github.com/mongodb/mcli/releases).
17+
Download the appropriate version for your platform from [mongocli releases](https://github.com/mongodb/mongocli/releases).
1818
Once downloaded, the binary can be run from anywhere.
1919
You don't need to install it into a global location.
2020
This works well for shared hosts and other systems where you don't have a privileged account.
@@ -30,26 +30,26 @@ Ideally, you should install it somewhere in your PATH for easy use. `/usr/local/
3030
### Fetch and Install
3131

3232
```bash
33-
git clone https://github.com/mongodb/mcli.git
34-
cd mcli
33+
git clone https://github.com/mongodb/mongocli.git
34+
cd mongocli
3535
make install
3636
```
3737

3838
# Usage
3939

40-
Run `mcli help` for a list of available commands
40+
Run `mongocli help` for a list of available commands
4141

4242
## Authentication
43-
Run `mcli config` to set up a profile.
43+
Run `mongocli config` to set up a profile.
4444

4545
You can also use `MCLI_OPS_MANAGER_URL`, `MCLI_PUBLIC_API_KEY`, and `MCLI_PRIVATE_API_KEY` to define some of the authentication variables
4646

4747
## ZSH Completion (experimental)
4848
Add the following to your `.zshrc` file
4949

5050
```bash
51-
source <(mcli completion zsh)
52-
compdef _mcli mcli
51+
source <(mongocli completion zsh)
52+
compdef _mongocli mongocli
5353
```
5454

5555
# Contributing
@@ -58,4 +58,4 @@ See our [CONTRIBUTING.md](CONTRIBUTING.md) Guide.
5858

5959
# License
6060

61-
mcli is released under the Apache 2.0 license. See [LICENSE](LICENSE)
61+
MongoDB CLI is released under the Apache 2.0 license. See [LICENSE](LICENSE)

cmd/root.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ import (
1818
"fmt"
1919
"log"
2020

21-
"github.com/mongodb/mcli/internal/cli"
22-
"github.com/mongodb/mcli/internal/config"
23-
"github.com/mongodb/mcli/internal/flags"
24-
"github.com/mongodb/mcli/internal/usage"
25-
"github.com/mongodb/mcli/internal/version"
21+
"github.com/mongodb/mongocli/internal/cli"
22+
"github.com/mongodb/mongocli/internal/config"
23+
"github.com/mongodb/mongocli/internal/flags"
24+
"github.com/mongodb/mongocli/internal/usage"
25+
"github.com/mongodb/mongocli/internal/version"
2626
"github.com/spf13/cobra"
2727
)
2828

e2e/atlas_alertconfig_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const (
3434
)
3535

3636
func TestAtlasAlertConfig(t *testing.T) {
37-
cliPath, err := filepath.Abs("../bin/mcli")
37+
cliPath, err := filepath.Abs("../bin/mongocli")
3838
if err != nil {
3939
t.Fatalf("unexpected error: %v", err)
4040
}

e2e/atlas_clusters_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import (
2929
)
3030

3131
func TestAtlasClusters(t *testing.T) {
32-
cliPath, err := filepath.Abs("../bin/mcli")
32+
cliPath, err := filepath.Abs("../bin/mongocli")
3333
if err != nil {
3434
t.Fatalf("unexpected error: %v", err)
3535
}

e2e/atlas_dbusers_test.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,14 @@ import (
2626
"time"
2727

2828
"github.com/mongodb/go-client-mongodb-atlas/mongodbatlas"
29-
"github.com/mongodb/mcli/internal/convert"
3029
)
3130

3231
const (
3332
roleReadWrite = "readWrite"
3433
)
3534

3635
func TestAtlasDBUsers(t *testing.T) {
37-
cliPath, err := filepath.Abs("../bin/mcli")
36+
cliPath, err := filepath.Abs("../bin/mongocli")
3837
if err != nil {
3938
t.Fatalf("unexpected error: %v", err)
4039
}
@@ -115,8 +114,8 @@ func TestAtlasDBUsers(t *testing.T) {
115114
t.Errorf("len(user.Roles) got=%#v\nwant=%#v\n", len(user.Roles), 1)
116115
}
117116

118-
if user.Roles[0].DatabaseName != convert.AdminDB {
119-
t.Errorf("got=%#v\nwant=%#v\n", convert.AdminDB, user.Roles[0].DatabaseName)
117+
if user.Roles[0].DatabaseName != "admin" {
118+
t.Errorf("got=%#v\nwant=%#v\n", "admin", user.Roles[0].DatabaseName)
120119
}
121120

122121
if user.Roles[0].RoleName != roleReadWrite {

0 commit comments

Comments
 (0)