From 790e4bd1b120e0fae239992b93ebc13f57fd05a3 Mon Sep 17 00:00:00 2001 From: Alfredo Garcia Date: Thu, 22 Feb 2024 09:41:28 -0300 Subject: [PATCH] update dry-run release commands (#8298) --- .../PULL_REQUEST_TEMPLATE/release-checklist.md | 15 +++++++++++---- .../workflows/scripts/release-crates-dry-run.sh | 10 ++++++++-- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE/release-checklist.md b/.github/PULL_REQUEST_TEMPLATE/release-checklist.md index 079672db6..5445834df 100644 --- a/.github/PULL_REQUEST_TEMPLATE/release-checklist.md +++ b/.github/PULL_REQUEST_TEMPLATE/release-checklist.md @@ -83,15 +83,22 @@ Check that the release will work: - [ ] Update crate versions, commit the changes to the release branch, and do a release dry-run: ```sh -cargo release version --verbose --execute --allow-branch '*' --workspace --exclude zebrad --exclude zebra-scan beta -# Due to a bug in cargo-release, we need to pass an exact version here -cargo release version --verbose --execute --allow-branch '*' --package zebra-scan 0.1.0-alpha.1 +# Update everything except for alpha crates and zebrad: +cargo release version --verbose --execute --allow-branch '*' --workspace --exclude zebrad --exclude zebra-scan --exclude zebra-grpc beta +# Due to a bug in cargo-release, we need to pass exact versions for alpha crates: +cargo release version --verbose --execute --allow-branch '*' --package zebra-scan 0.1.0-alpha.4 +cargo release version --verbose --execute --allow-branch '*' --package zebra-grpc 0.1.0-alpha.2 +# Update zebrad: cargo release version --verbose --execute --allow-branch '*' --package zebrad patch # [ major | minor | patch ] +# Continue with the release process: cargo release replace --verbose --execute --allow-branch '*' --package zebrad cargo release commit --verbose --execute --allow-branch '*' ``` -Crate publishing is [automatically checked in CI](https://github.com/ZcashFoundation/zebra/actions/workflows/release-crates-io.yml) using "dry run" mode. +Crate publishing is [automatically checked in CI](https://github.com/ZcashFoundation/zebra/actions/workflows/release-crates-io.yml) using "dry run" mode, however due to a bug in `cargo-release` we need to pass exact versions to the alpha crates: + +- [ ] Update `zebra-scan` and `zebra-grpc` alpha crates in the [release-crates-dry-run workflow script](https://github.com/ZcashFoundation/zebra/blob/main/.github/workflows/scripts/release-crates-dry-run.sh) +- [ ] Push the above version changes to the release branch. ## Update End of Support diff --git a/.github/workflows/scripts/release-crates-dry-run.sh b/.github/workflows/scripts/release-crates-dry-run.sh index 7fef5cd80..ad0955bac 100755 --- a/.github/workflows/scripts/release-crates-dry-run.sh +++ b/.github/workflows/scripts/release-crates-dry-run.sh @@ -17,10 +17,16 @@ if ! cargo release --version &> /dev/null; then fi # Release process -# Ensure to have an extra `--no-confirm` argument for non-interactive testing. +# We use the same commands as the [release drafter](https://github.com/ZcashFoundation/zebra/blob/main/.github/PULL_REQUEST_TEMPLATE/release-checklist.md#update-crate-versions) +# with an extra `--no-confirm` argument for non-interactive testing. +# Update everything except for alpha crates and zebrad: cargo release version --verbose --execute --no-confirm --allow-branch '*' --workspace --exclude zebrad --exclude zebra-scan --exclude zebra-grpc beta -# TODO: `zebra-scan` and `zebra-grpc` has to be updated with exact versions, we are skipping them by now. +# Due to a bug in cargo-release, we need to pass exact versions for alpha crates: +cargo release version --verbose --execute --allow-branch '*' --package zebra-scan 0.1.0-alpha.4 +cargo release version --verbose --execute --allow-branch '*' --package zebra-grpc 0.1.0-alpha.2 +# Update zebrad: cargo release version --verbose --execute --no-confirm --allow-branch '*' --package zebrad patch +# Continue with the release process: cargo release replace --verbose --execute --no-confirm --allow-branch '*' --package zebrad cargo release commit --verbose --execute --no-confirm --allow-branch '*'