Skip to content

Commit

Permalink
ci: update RELEASING.md, manually bump versions of renamed crates
Browse files Browse the repository at this point in the history
  • Loading branch information
MingweiSamuel committed Aug 30, 2024
1 parent 0bb0c61 commit 47d39c5
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,5 @@ jobs:
env:
# Make sure to set this so the `gh` CLI works using our token.
GH_TOKEN: ${{ steps.generate_token.outputs.token }}
# Show `cargo-smart-release`'s stack trace on error.
RUST_BACKTRACE: 1
34 changes: 33 additions & 1 deletion RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,39 @@ The changelogs should now be safely preserved by future releases.

## Addendum: Renaming crates

TODO
First, follow the [steps above for moving crates](#addendum-moving-crates).

After renaming a crate, `cargo-smart-release` will see it a brand new crate with no published
versions on crates.io, and will therefore not bump the version. This is not desired behavior, and
generating the changelog will fail unintelligibly due to the conflicting versions:
```log
BUG: User segments are never auto-generated: ...
```

To fix this, before releasing, manually bump the version of the renamed crate:
```toml
version = "0.8.0"
# becomes
version = "0.9.0"
```

You will also need to manually update any crates that depend on the rename crate as well:
```toml
crate_old_name = { path = "../crate_old_path", version = "^0.8.0" }
# becomes
crate_new_name = { path = "../crate_new_path", version = "^0.9.0" }
```

Commit those changes, then continue as normal.

```sh
git tag | grep old_crate
```
Find and copy the newest (largest) version.

```sh
git tag new_crate-v0.5.2 old_crate-v0.5.2
```

## Addendum: The GitHub App account

Expand Down

0 comments on commit 47d39c5

Please sign in to comment.