Skip to content

Commit

Permalink
ci: update RELEASING.md, say to manually bump versions of renamed c…
Browse files Browse the repository at this point in the history
…rates
  • Loading branch information
MingweiSamuel committed Aug 30, 2024
1 parent c41787f commit 63598e6
Show file tree
Hide file tree
Showing 2 changed files with 40 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
39 changes: 38 additions & 1 deletion RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,44 @@ 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. `Cargo.toml`:
```toml
name = "crate_old_name"
publish = true
version = "0.8.0"
# becomes
name = "crate_new_name"
publish = true
version = "0.9.0"
```
(In this case, bumping the minor version)

You will also need to manually update any crates that depend on the renamed 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 63598e6

Please sign in to comment.