forked from tldr-pages/tldr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cargo-*: add page; cargo-logout: update page (tldr-pages#11337)
Co-authored-by: Juri Dispan <[email protected]>
- Loading branch information
Showing
6 changed files
with
82 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# cargo login | ||
|
||
> Save an API token from the registry locally. | ||
> The token is used to authenticate to a package registry. You can remove it using `cargo logout`. | ||
> More information: <https://doc.rust-lang.org/cargo/commands/cargo-login.html>. | ||
- Add an API token to the local credential storage (located in `$CARGO_HOME/credentials.toml`): | ||
|
||
`cargo login` | ||
|
||
- Specify the name of the registry to use (registry names can be defined in the config - the default is <https://crates.io>): | ||
|
||
`cargo login --registry {{name}}` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# cargo owner | ||
|
||
> Manage the owners of a crate on the registry. | ||
> More information: <https://doc.rust-lang.org/cargo/commands/cargo-owner.html>. | ||
- Invite the given user or team as an owner: | ||
|
||
`cargo owner --add {{username|github:org_name:team_name}} {{crate}}` | ||
|
||
- Remove the given user or team as an owner: | ||
|
||
`cargo owner --remove {{username|github:org_name:team_name}} {{crate}}` | ||
|
||
- List owners of a crate: | ||
|
||
`cargo owner --list {{crate}}` | ||
|
||
- Specify the name of the registry to use (registry names can be defined in the config - the default is <https://crates.io>): | ||
|
||
`cargo owner --registry {{name}}` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# cargo package | ||
|
||
> Assemble a local package into a distributable tarball (a `.crate` file). | ||
> Similar to `cargo publish --dry-run`, but has more options. | ||
> More information: <https://doc.rust-lang.org/cargo/commands/cargo-package.html>. | ||
- Perform checks and create a `.crate` file (equivalent of `cargo publish --dry-run`): | ||
|
||
`cargo package` | ||
|
||
- Display what files would be included in the tarball without actually creating it: | ||
|
||
`cargo package --list` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# cargo publish | ||
|
||
> Upload a package to a registry. | ||
> Note: you have to add an authentication token using `cargo login` before publishing a package. | ||
> More information: <https://doc.rust-lang.org/cargo/commands/cargo-publish.html>. | ||
- Perform checks, create a `.crate` file and upload it to the registry: | ||
|
||
`cargo publish` | ||
|
||
- Perform checks, create a `.crate` file but don't upload it (equivalent of `cargo package`): | ||
|
||
`cargo publish --dry-run` | ||
|
||
- Specify the name of the registry to use (registry names can be defined in the config - the default is <https://crates.io>): | ||
|
||
`cargo publish --registry {{name}}` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# cargo yank | ||
|
||
> Remove a pushed crate from the index. This should only be used when you accidentally release a significantly broken crate. | ||
> Note: this does not remove any data. The crate is still present after a yank - this just prevents new projects from using it. | ||
> More information: <https://doc.rust-lang.org/cargo/commands/cargo-yank.html>. | ||
- Yank the specified version of a crate: | ||
|
||
`cargo yank {{crate}}@{{version}}` | ||
|
||
- Undo a yank (i.e. allow downloading it again): | ||
|
||
`cargo yank --undo {{crate}}@{{version}}` | ||
|
||
- Specify the name of the registry to use (registry names can be defined in the config - the default is <https://crates.io>): | ||
|
||
`cargo yank --registry {{name}} {{crate}}@{{version}}` |