summaryrefslogtreecommitdiff
path: root/tools/release
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2023-03-16 09:26:30 -0400
committerGitHub <noreply@github.com>2023-03-16 09:26:30 -0400
commitb9d9cd17c96e19e80932caaed017745e74b44f8b (patch)
tree4cd52e41ccfce59145eeb713e89c653aaac97e6b /tools/release
parenteb3d79ab1bcdc554acf03034606836443a0971e5 (diff)
chore: upgrade deno_automation to 0.19.0 (#18213)
I updated the lockfile with: ``` deno cache --lock=tools/deno.lock.json --lock-write ./tools/wpt.ts ./tools/upload_wptfyi.js ./tools/release/deps.ts ```
Diffstat (limited to 'tools/release')
-rwxr-xr-xtools/release/00_start_release.ts20
-rwxr-xr-xtools/release/01_bump_crate_versions.ts9
-rw-r--r--tools/release/deps.ts4
3 files changed, 16 insertions, 17 deletions
diff --git a/tools/release/00_start_release.ts b/tools/release/00_start_release.ts
index 1e61c3aa5..dc3f4889d 100755
--- a/tools/release/00_start_release.ts
+++ b/tools/release/00_start_release.ts
@@ -2,7 +2,7 @@
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
import { $, createOctoKit, semver } from "./deps.ts";
-const currentDirPath = $.path.dirname($.path.fromFileUrl(import.meta.url));
+const currentDirPath = $.path(import.meta).parentOrThrow();
$.logStep("Getting next version...");
const nextVersion = getNextVersion(semver.parse(getCliVersion())!);
@@ -29,27 +29,27 @@ $.log("==============================================");
function getNextVersion(originalVersion: semver.SemVer) {
if (Deno.args.some((a) => a === "--patch")) {
- return originalVersion.inc("patch");
+ return originalVersion.increment("patch");
} else if (Deno.args.some((a) => a === "--minor")) {
- return originalVersion.inc("minor");
+ return originalVersion.increment("minor");
} else if (Deno.args.some((a) => a === "--major")) {
- return originalVersion.inc("major");
+ return originalVersion.increment("major");
} else {
throw new Error("Missing argument");
}
}
function buildDenoReleaseInstructionsDoc() {
- const templateText = Deno.readTextFileSync(
- $.path.join(currentDirPath, "release_doc_template.md"),
- );
+ const templateText = currentDirPath
+ .join("release_doc_template.md")
+ .readTextSync();
return `# Deno CLI ${nextVersion.toString()} Release Checklist\n\n${templateText}`;
}
function getCliVersion() {
- const cargoTomlText = Deno.readTextFileSync(
- $.path.join(currentDirPath, "../../cli/Cargo.toml"),
- );
+ const cargoTomlText = currentDirPath
+ .join("../../cli/Cargo.toml")
+ .readTextSync();
const result = cargoTomlText.match(/^version\s*=\s*"([^"]+)"$/m);
if (result == null || result.length !== 2) {
$.log("Cargo.toml");
diff --git a/tools/release/01_bump_crate_versions.ts b/tools/release/01_bump_crate_versions.ts
index 50d2cc5b2..d9c67a817 100755
--- a/tools/release/01_bump_crate_versions.ts
+++ b/tools/release/01_bump_crate_versions.ts
@@ -97,17 +97,16 @@ async function getGitLog() {
}
async function updateStdVersion() {
- const compatFilePath = $.path.join(cliCrate.folderPath, "deno_std.rs");
- const text = await Deno.readTextFile(compatFilePath);
+ const compatFilePath = cliCrate.folderPath.join("deno_std.rs");
+ const text = await compatFilePath.readText();
const versionRe = /std@([0-9]+\.[0-9]+\.[0-9]+)/;
const stdVersionText = versionRe.exec(text)?.[1];
if (stdVersionText == null) {
throw new Error(`Could not find the deno_std version in ${compatFilePath}`);
}
const stdVersion = semver.parse(stdVersionText)!;
- const newStdVersion = stdVersion.inc("minor");
- await Deno.writeTextFile(
- compatFilePath,
+ const newStdVersion = stdVersion.increment("minor");
+ await compatFilePath.writeText(
text.replace(versionRe, `std@${newStdVersion}`),
);
}
diff --git a/tools/release/deps.ts b/tools/release/deps.ts
index 7b7a768ff..baf479b64 100644
--- a/tools/release/deps.ts
+++ b/tools/release/deps.ts
@@ -1,4 +1,4 @@
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
-export * from "https://raw.githubusercontent.com/denoland/automation/0.16.0/mod.ts";
-export * from "https://raw.githubusercontent.com/denoland/automation/0.16.0/github_actions.ts";
+export * from "https://raw.githubusercontent.com/denoland/automation/0.19.0/mod.ts";
+export * from "https://raw.githubusercontent.com/denoland/automation/0.19.0/github_actions.ts";