summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Somers <asomers@gmail.com>2021-09-28 21:16:42 -0600
committerAlan Somers <asomers@gmail.com>2021-09-28 21:16:42 -0600
commit1b5476aeedff940fa3b0fa70a3c6680c837626fc (patch)
tree08f750ffd152c5d4e083d55fc137d8553a715fe1
parent150579c044924386ae88b4d36d54698b9606ebd8 (diff)
downloadnix-1b5476aeedff940fa3b0fa70a3c6680c837626fc.zip
[skip ci] Change release procedure to use cargo-release
Remove the example Cargo.toml entry from README.md because it's obvious, and it creates extra work at release time.
-rw-r--r--README.md12
-rw-r--r--RELEASE_PROCEDURE.md40
-rw-r--r--release.toml5
3 files changed, 17 insertions, 40 deletions
diff --git a/README.md b/README.md
index 296f83fb..a8759f1c 100644
--- a/README.md
+++ b/README.md
@@ -84,16 +84,10 @@ Tier 3:
* x86_64-unknown-openbsd
* x86_64-unknown-redox
-## Usage
+## Minimum Supported Rust Version (MSRV)
-`nix` requires Rust 1.46.0 or newer.
-
-To use `nix`, add this to your `Cargo.toml`:
-
-```toml
-[dependencies]
-nix = "0.22.0"
-```
+nix is supported on Rust 1.46.0 and higher. It's MSRV will not be
+changed in the future without bumping the major or minor version.
## Contributing
diff --git a/RELEASE_PROCEDURE.md b/RELEASE_PROCEDURE.md
index f26b6197..b8cfcd81 100644
--- a/RELEASE_PROCEDURE.md
+++ b/RELEASE_PROCEDURE.md
@@ -3,38 +3,16 @@ library.
# Before Release
-Based on changes since the last release, pick a new version number
-following semver conventions. For nix, a change that drops support for
-some Rust versions counts as a breaking change, and requires a major bump.
+Nix uses [cargo release](https://github.com/crate-ci/cargo-release) to automate
+the release process. Based on changes since the last release, pick a new
+version number following semver conventions. For nix, a change that drops
+support for some Rust versions counts as a breaking change, and requires a
+major bump.
The release is prepared as follows:
-- Ask for a new libc version if, necessary. It usually is.
-- Make a commit with a message like "Release v0.8.3" with the following
- changes:
- - In `CHANGELOG.md`, rename the Unreleased section to the new version
- followed by the date of the release.
- - Add a new Unreleased section header to `CHANGELOG.md` with the four
- Added, Changed, Fixed, and Removed sections added.
- - In `Cargo.toml`, update the version to the new version.
- - In `Cargo.toml`, change the libc dependency to the latest version.
- - In `README.md`, update the version in the Usage section to the new
- version.
+- Ask for a new libc version if, necessary. It usually is. Then update the
+ dependency in Cargo.toml accordingly.
- Confirm that everything's ready for a release by running
- `cargo publish --dry-run`
-- Make a pull request.
-- Once the PR is merged, tag the merge commit, e.g. `git tag v0.8.3
- $MERGE_COMMIT_SHA1`.
-- Push the tag, e.g. `git push origin v0.8.3`.
-
-# Create Release
-
-- Checkout the tag.
-- Publish to crates.io with `cargo publish`.
-
-# After Release
-
-Once a release is done, all that's left is to change the `libc` version
-back to using the version from git. So make a pull request containing a
-simple commit entitled "Start the next dev cycle" that changes the `libc`
-dependency in `Cargo.toml` to using it from git master.
+ `cargo release --dry-run <patch|minor|major>`
+- Create the release with `cargo release <patch|minor|major>`
diff --git a/release.toml b/release.toml
new file mode 100644
index 00000000..df2c9da4
--- /dev/null
+++ b/release.toml
@@ -0,0 +1,5 @@
+no-dev-version = true
+pre-release-replacements = [
+ { file="CHANGELOG.md", search="Unreleased", replace="{{version}}" },
+ { file="CHANGELOG.md", search="ReleaseDate", replace="{{date}}" }
+]