From ea62626a766dc54ed6a1ad249acd08b78f1aeba5 Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Fri, 4 Feb 2022 17:28:27 +0200 Subject: [PATCH 1/3] releasing: Remove cargo-hack from doc Signed-off-by: Alexandru Vasile --- RELEASING.md | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/RELEASING.md b/RELEASING.md index 3685873b0c..adb2d8aa94 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -43,17 +43,14 @@ We also assume that ongoing work done is being merged directly to the `master` b 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). + 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) && \ + (cd macro && cargo publish) && \ sleep 10 && \ (cd subxt && cargo publish) && \ sleep 10 && \ From f14f08c45bdc6aa30bfa0fcb6dab02822eea60bb Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Fri, 4 Feb 2022 17:47:42 +0200 Subject: [PATCH 2/3] releasing: Add dry-run step Signed-off-by: Alexandru Vasile --- RELEASING.md | 54 ++++++++++++++++++++++++++++++++++------------------ 1 file changed, 35 insertions(+), 19 deletions(-) diff --git a/RELEASING.md b/RELEASING.md index adb2d8aa94..5d85d7889c 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -40,25 +40,41 @@ 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. - - 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 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. + 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) && \ + sleep 10 && \ + (cd macro && cargo publish --dry-run) && \ + sleep 10 && \ + (cd subxt && cargo publish --dry-run) && \ + sleep 10 && \ + (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: From 5044b11887764034ea8e1e1c0bf42cd30158265d Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Fri, 4 Feb 2022 18:17:34 +0200 Subject: [PATCH 3/3] releasing: Remove sleep from dry-run step Signed-off-by: Alexandru Vasile --- RELEASING.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/RELEASING.md b/RELEASING.md index 5d85d7889c..6972ffb341 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -52,11 +52,8 @@ We also assume that ongoing work done is being merged directly to the `master` b ``` (cd codegen && cargo publish --dry-run) && \ - sleep 10 && \ (cd macro && cargo publish --dry-run) && \ - sleep 10 && \ (cd subxt && cargo publish --dry-run) && \ - sleep 10 && \ (cd cli && cargo publish --dry-run); ```