Skip to content

Commit

Permalink
Update man page of cargo publish to include the new behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
canova committed Aug 6, 2020
1 parent 81ecfe9 commit a8ce734
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 14 deletions.
10 changes: 9 additions & 1 deletion src/doc/man/cargo-publish.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,15 @@ Allow working directories with uncommitted VCS changes to be packaged.

{{> options-index }}

{{> options-registry }}
{{#option "`--registry` _registry_"}}
Name of the registry to publish to. Registry names are defined in [Cargo
config files](../reference/config.html). If not specified, and there is a
[`package.publish`](../reference/manifest.html#the-publish-field) field in
`Cargo.toml` with a single registry, then it will publish to that registry.
Otherwise it will use the default registry, which is defined by the
[`registry.default`](../reference/config.html#registry-default) config key
which defaults to `crates-io`.
{{/option}}

{{/options}}

Expand Down
13 changes: 9 additions & 4 deletions src/doc/man/generated_txt/cargo-publish.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,16 @@ OPTIONS
The URL of the registry index to use.

--registry registry
Name of the registry to use. Registry names are defined in Cargo
config files
Name of the registry to publish to. Registry names are defined in
Cargo config files
<https://doc.rust-lang.org/cargo/reference/config.html>. If not
specified, the default registry is used, which is defined by the
registry.default config key which defaults to crates-io.
specified, and there is a package.publish
<https://doc.rust-lang.org/cargo/reference/manifest.html#the-publish-field>
field in Cargo.toml with a single registry, then it will publish to
that registry. Otherwise it will use the default registry, which is
defined by the registry.default
<https://doc.rust-lang.org/cargo/reference/config.html#registry-default>
config key which defaults to crates-io.

Compilation Options
--target triple
Expand Down
12 changes: 7 additions & 5 deletions src/doc/src/commands/cargo-publish.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,13 @@ of the registry in all capital letters.</dd>


<dt class="option-term" id="option-cargo-publish---registry"><a class="option-anchor" href="#option-cargo-publish---registry"></a><code>--registry</code> <em>registry</em></dt>
<dd class="option-desc">Name of the registry to use. Registry names are defined in <a href="https://doc.rust-lang.org/cargo/reference/config.html">Cargo config
files</a>. If not specified, the default registry is used,
which is defined by the <code>registry.default</code> config key which defaults to
<code>crates-io</code>.</dd>

<dd class="option-desc">Name of the registry to publish to. Registry names are defined in <a href="https://doc.rust-lang.org/cargo/reference/config.html">Cargo
config files</a>. If not specified, and there is a
<a href="https://doc.rust-lang.org/cargo/reference/manifest.html#the-publish-field"><code>package.publish</code></a> field in
<code>Cargo.toml</code> with a single registry, then it will publish to that registry.
Otherwise it will use the default registry, which is defined by the
<a href="https://doc.rust-lang.org/cargo/reference/config.html#registry-default"><code>registry.default</code></a> config key
which defaults to <code>crates-io</code>.</dd>


</dl>
Expand Down
11 changes: 7 additions & 4 deletions src/etc/man/cargo-publish.1
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,13 @@ The URL of the registry index to use.
.sp
\fB\-\-registry\fR \fIregistry\fR
.RS 4
Name of the registry to use. Registry names are defined in \fICargo config
files\fR <https://doc.rust\-lang.org/cargo/reference/config.html>\&. If not specified, the default registry is used,
which is defined by the \fBregistry.default\fR config key which defaults to
\fBcrates\-io\fR\&.
Name of the registry to publish to. Registry names are defined in \fICargo
config files\fR <https://doc.rust\-lang.org/cargo/reference/config.html>\&. If not specified, and there is a
\fI\f(BIpackage.publish\fI\fR <https://doc.rust\-lang.org/cargo/reference/manifest.html#the\-publish\-field> field in
\fBCargo.toml\fR with a single registry, then it will publish to that registry.
Otherwise it will use the default registry, which is defined by the
\fI\f(BIregistry.default\fI\fR <https://doc.rust\-lang.org/cargo/reference/config.html#registry\-default> config key
which defaults to \fBcrates\-io\fR\&.
.RE
.SS "Compilation Options"
.sp
Expand Down

0 comments on commit a8ce734

Please sign in to comment.