I have a package that can only be published to some internal repositories:
[package]
publish = ["myregistry-prod", "myregistry-dev"]
both registries are correctly configured in .cargo/config.toml. Setting the version is not possible for us:
$ cargo release version --no-confirm -x 0.4.0
error: failed to get package content for /home/runner/work/mypackage/Cargo.toml: error: `mypackage` cannot be packaged.
The registry `myregistry` is not listed in the `package.publish` value in Cargo.toml.
I see two issues here:
- why does
version do a registry check? It should only update the version number
- if this check is necessary, it should be possible to pass
--registry to the version command, similar to publish --registry.