From 4283e2907e13a089fa2d026c92e074f019550880 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Wed, 15 Sep 2021 09:16:06 -0400 Subject: [PATCH] chore(scripts): improvements to the release scripts based on the 1.14 release (#12079) --- tools/cut_a_release.md | 16 ++++++++-------- tools/release/02_publish_dependency_crates.ts | 12 +++++++++--- tools/release/helpers/deno_workspace.ts | 8 ++++---- 3 files changed, 21 insertions(+), 15 deletions(-) diff --git a/tools/cut_a_release.md b/tools/cut_a_release.md index 5335518c79..5ce421d8b6 100644 --- a/tools/cut_a_release.md +++ b/tools/cut_a_release.md @@ -52,19 +52,19 @@ cut.** 13. Wait for CI pipeline on the created tag branch to pass. -The CI pipeline will create a release draft on GitHub -(https://github.com/denoland/deno/releases). + The CI pipeline will create a release draft on GitHub + (https://github.com/denoland/deno/releases). -11. Upload Apple M1 build to the release draft & to dl.deno.land. +14. Upload Apple M1 build to the release draft & to dl.deno.land. -12. Publish the release on Github +15. Publish the release on Github -13. Update the Deno version on the website by updating +16. Update the Deno version on the website by updating https://github.com/denoland/deno_website2/blob/main/versions.json. -14. Push a new tag to [`manual`](https://github.com/denoland/manual). The tag - must match the tag from point 9; you don't need to create dedicated commit - for that purpose, it's enough to tag the latest commit in that repo. +17. Push a new tag to [`manual`](https://github.com/denoland/manual). The tag + must match the CLI tag; you don't need to create dedicated commit for that + purpose, it's enough to tag the latest commit in that repo. ## Updating `deno_docker` diff --git a/tools/release/02_publish_dependency_crates.ts b/tools/release/02_publish_dependency_crates.ts index 9dd6253fe1..d325f86a2f 100644 --- a/tools/release/02_publish_dependency_crates.ts +++ b/tools/release/02_publish_dependency_crates.ts @@ -4,8 +4,14 @@ import { DenoWorkspace, getCratesPublishOrder } from "./helpers/mod.ts"; const workspace = await DenoWorkspace.load(); -const dependencyCrates = workspace.getDependencyCrates(); +const dependencyCrates = getCratesPublishOrder(workspace.getDependencyCrates()); -for (const crate of getCratesPublishOrder(dependencyCrates)) { - await crate.publish(); +try { + for (const [i, crate] of dependencyCrates.entries()) { + await crate.publish(); + console.log(`Published ${i + 1} of ${dependencyCrates.length} crates.`); + } +} finally { + // system beep to notify error or completion + console.log("\x07"); } diff --git a/tools/release/helpers/deno_workspace.ts b/tools/release/helpers/deno_workspace.ts index 169394af95..802063b62a 100644 --- a/tools/release/helpers/deno_workspace.ts +++ b/tools/release/helpers/deno_workspace.ts @@ -141,15 +141,15 @@ export class DenoWorkspaceCrate { console.log(`Publishing ${this.name} ${this.version}...`); - // Sometimes a publish may fail due to local caching issues. - // Usually it will fix itself after retrying so try a few - // times before failing hard. + // Sometimes a publish may fail due to the crates.io index + // not being updated yet. Usually it will be resolved after + // retrying, so try a few times before failing hard. return await withRetries({ action: async () => { await cargo.publishCrate(this.directoryPath); return true; }, - retryCount: 3, + retryCount: 5, retryDelaySeconds: 10, }); }