Improve docs about releasing new crate versions
This commit is contained in:
parent
ffcf50fb4f
commit
fb3067489b
@ -2,16 +2,45 @@
|
|||||||
|
|
||||||
## General
|
## General
|
||||||
|
|
||||||
* When releasing a pre-release version, make sure other crates are updated to
|
* `ruma-identifiers-validation` and the `-macros` crates don't get their own
|
||||||
depend on it, with an exact version requirement (`=x.y.z-tag`)
|
release commit or tag since they are internal packages.
|
||||||
* When releasing a regular version, make sure other crates are updated to depend
|
* Macro crates are versioned identically to their "parent" crate and need to be
|
||||||
on it, with a regular (same as caret / `^`) version requirement (`x.y.z`)
|
released before the parent crate.
|
||||||
* Macro crates are versioned identically to their "parent" crate and are exempt
|
* `ruma-identifiers-validation` is released before `ruma-identifiers-macros`
|
||||||
from the rule above: Dependencies from the parent crate to the macro crate
|
and `ruma-identifiers`.
|
||||||
(for re-exporting) should always use exact version requirements. Whenever a
|
|
||||||
crate with an associated macro crate should get a new release, release a new
|
## Creating a release commit
|
||||||
version of the macro crate with the same number first, even if there were no
|
|
||||||
changes in the macro code.
|
*To be automated in the future, see https://github.com/ruma/ruma/issues/452.*
|
||||||
|
|
||||||
|
Update `Cargo.toml` of the relevant package, and update the dependency on this
|
||||||
|
package in other crates in the workspace (if applicable):
|
||||||
|
|
||||||
|
* When doing a prerelease (e.g. `0.10.0-beta.1`), depend on it with an exact
|
||||||
|
version requirement (`version = "=0.10.0-beta.1`)
|
||||||
|
* Macro crate dependencies always use an exact version requirement, even for
|
||||||
|
final releases.
|
||||||
|
* Otherwise, use `version = "x.y.z"`.
|
||||||
|
|
||||||
|
Update the `CHANGELOG.md` of the relevant package.
|
||||||
|
|
||||||
|
* If there is already a section for the version to be released, remove the
|
||||||
|
`(unreleased)` from its title.
|
||||||
|
* Otherwise, change the `[unreleased]` section title to the version being
|
||||||
|
released.
|
||||||
|
|
||||||
|
Finally, commit these changes as `Release {crate} {version}`.
|
||||||
|
|
||||||
|
## Publishing to crates.io and creating a release tag
|
||||||
|
|
||||||
|
*Note: only do this for final release, i.e. not alpha or beta releases, and not
|
||||||
|
for `ruma-identifiers-validation` or one of the macro crates.*
|
||||||
|
|
||||||
|
All you have to do is run the corresponding `xtask` command:
|
||||||
|
|
||||||
|
```
|
||||||
|
cargo xtask release {crate}
|
||||||
|
```
|
||||||
|
|
||||||
## Dependencies
|
## Dependencies
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user