Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update release documentation with dry-run #435

Merged
merged 3 commits into from
Feb 4, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 32 additions & 22 deletions RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,28 +40,38 @@ We also assume that ongoing work done is being merged directly to the `master` b

8. Now, we're ready to publish the release to crates.io.

Checkout `master`, ensuring we're looking at that latest merge (`git pull`).

The crates in this repository need publishing in a specific order, since they depend on each other.
Additionally, `subxt-macro` has a circular dev dependency on `subxt`, so we use `cargo hack` to remove
dev dependencies (and `--allow-dirty` to ignore the git changes as a result) to publish it.

So, first install [cargo-hack](https://docs.rs/crate/cargo-hack/latest) with `cargo install cargo-hack`. Next, you can run something like the following
command to publish each crate in the required order (allowing a little time in between each to let `crates.io` catch up
with what we've published).

```
(cd codegen && cargo publish) && \
sleep 10 && \
(cd macro && cargo hack publish --no-dev-deps --allow-dirty) && \
sleep 10 && \
(cd subxt && cargo publish) && \
sleep 10 && \
(cd cli && cargo publish);
```

If you run into any issues regarding crates not being able to find suitable versions of other `subxt-*` crates,
you may just need to wait a little longer and then run the remaining portion of that command.
1. Checkout `master`, ensuring we're looking at that latest merge (`git pull`).

```
git checkout master && git pull
```

2. Perform a dry-run publish to ensure the crates can be correctly published.

The crates in this repository need publishing in a specific order, since they depend on each other.

```
(cd codegen && cargo publish --dry-run) && \
(cd macro && cargo publish --dry-run) && \
(cd subxt && cargo publish --dry-run) && \
(cd cli && cargo publish --dry-run);
```

3. If the dry-run was successful, run the following command to publish each crate in the required order (allowing
a little time in between each to let crates.io catch up with what we've published).

```
(cd codegen && cargo publish) && \
sleep 10 && \
(cd macro && cargo publish) && \
sleep 10 && \
(cd subxt && cargo publish) && \
sleep 10 && \
(cd cli && cargo publish);
```

If you run into any issues regarding crates not being able to find suitable versions of other `subxt-*` crates,
you may just need to wait a little longer and then run the remaining portion of that command.

9. If the release was successful, tag the commit that we released in the `master` branch with the
version that we just released, for example:
Expand Down