Skip to content

Commit

Permalink
update maintenance guide with recent news
Browse files Browse the repository at this point in the history
  • Loading branch information
Byron committed Aug 11, 2024
1 parent 01c3f03 commit 4d2acf0
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion MAINTENANCE.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
This document explains how to perform the project's maintenance tasks.

### Repository Configuration

Settings can be changed here by means of a PR - depending on what it is a conversation about pro's and cons might be needed.

https://github.com/rust-lang/team/blob/master/repos/rust-lang/flate2-rs.toml

You can send a PR to add `required-approvals = 0` to the configuration file above. See [this configuration](https://github.com/rust-lang/team/blob/master/repos/rust-lang/libc.toml)
for an example.


### Creating a new release

#### Artifacts

* a tag of the version number
* a new [crate version](https://crates.io/crates/flate2/versions)

#### Process
#### Process: Plain `cargo publish`

To generate all the artifacts above, one proceeds as follows:

Expand All @@ -19,3 +29,20 @@ To generate all the artifacts above, one proceeds as follows:
6. `git push --tags` to push the new tag.
7. Go to the newly created release page on GitHub and edit it by pressing the "Generate Release Notes" and the `@` button. Save the release.

#### Alternative Process: `cargo smart-release`

This also maintains the `changelog.md` file, and it's able to pick up previous `cargo publish` releases and thus mixes well.
However, it's quite new and needs some polishing.

To just update the changelog, run `cargo changelog --write`.

To create a new release, do as follows:

1. `git checkout -b release-<next-version>` - move to a branch to prepare making changes to the repository. *Changes cannot be made to `main` as it is protected.*
2. `cargo changelog --write` to update the changelog. Edit it to your liking.
3. Create a commit like `git commit -am "update changelog prior to release"`
4. `cargo smart-release -e --update-crates-index` - double-check that the release version is sensible, and if not, just edit `Cargo.toml` by hand before.
5. Tags were created, and they should be pushed, but it might be that it fails to create a GitHub release.
6. Create an additional release tag with the `v` removed, i.e. `git tag -s <version> v<version>`. Then `git push --tags` by hand.
7. Double-check the newly created release on GitHub is populated - if not, generate the changelog manually.

0 comments on commit 4d2acf0

Please sign in to comment.