Update man page of cargo publish to include the new behavior

This commit is contained in:
Nazım Can Altınova 2020-08-06 13:21:24 +02:00
parent 81ecfe9466
commit a8ce734a95
No known key found for this signature in database
GPG Key ID: 722E786F0729647A
4 changed files with 32 additions and 14 deletions

View File

@ -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}}

View File

@ -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

View File

@ -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>

View File

@ -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