summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtools/release/01_bump_crate_versions.ts17
-rwxr-xr-xtools/release/04_create_release_tag.ts11
-rw-r--r--tools/release/deps.ts4
3 files changed, 19 insertions, 13 deletions
diff --git a/tools/release/01_bump_crate_versions.ts b/tools/release/01_bump_crate_versions.ts
index 70c92637e..c87be4591 100755
--- a/tools/release/01_bump_crate_versions.ts
+++ b/tools/release/01_bump_crate_versions.ts
@@ -78,17 +78,22 @@ async function getReleasesMdText() {
}
async function getGitLog() {
- const lastVersion = semver.parse(originalCliVersion)!;
- const lastVersionTag = `v${originalCliVersion}`;
+ const originalVersion = semver.parse(originalCliVersion)!;
+ const originalVersionTag = `v${originalCliVersion}`;
// fetch the upstream tags
await repo.gitFetchTags("upstream");
+ // make the repo unshallow so we can fetch the latest tag
+ if (await repo.gitIsShallow()) {
+ await repo.gitFetchUnshallow("origin");
+ }
+
// this means we're on the patch release
const latestTag = await repo.gitLatestTag();
- if (latestTag === lastVersionTag) {
+ if (latestTag === originalVersionTag) {
return await repo.getGitLogFromTags(
"upstream",
- lastVersionTag,
+ originalVersionTag,
undefined,
);
} else {
@@ -96,8 +101,8 @@ async function getGitLog() {
await repo.gitFetchHistory("upstream");
const lastMinorHistory = await repo.getGitLogFromTags(
"upstream",
- `v${lastVersion.major}.${lastVersion.minor}.0`,
- lastVersionTag,
+ `v${originalVersion.major}.${originalVersion.minor}.0`,
+ originalVersionTag,
);
const currentHistory = await repo.getGitLogFromTags(
"upstream",
diff --git a/tools/release/04_create_release_tag.ts b/tools/release/04_create_release_tag.ts
index 1a770e6cd..8eaac2514 100755
--- a/tools/release/04_create_release_tag.ts
+++ b/tools/release/04_create_release_tag.ts
@@ -1,4 +1,4 @@
-#!/usr/bin/env -S deno run --allow-read --allow-write --allow-run=cargo --no-check
+#!/usr/bin/env -S deno run --allow-read --allow-write --allow-run=cargo,git --no-check
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.
import { DenoWorkspace } from "./deno_workspace.ts";
@@ -8,10 +8,11 @@ const cliCrate = workspace.getCliCrate();
await repo.gitFetchTags("origin");
const tags = await repo.getGitTags();
+const tagName = `v${cliCrate.version}`;
-if (tags.has(cliCrate.version)) {
- console.log(`Tag ${cliCrate.version} already exists.`);
+if (tags.has(tagName)) {
+ console.log(`Tag ${tagName} already exists.`);
} else {
- await repo.gitTag(cliCrate.version);
- await repo.gitPush(cliCrate.version);
+ await repo.gitTag(tagName);
+ await repo.gitPush(tagName);
}
diff --git a/tools/release/deps.ts b/tools/release/deps.ts
index 9c23e509e..75cc872a1 100644
--- a/tools/release/deps.ts
+++ b/tools/release/deps.ts
@@ -1,4 +1,4 @@
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.
-export * from "https://raw.githubusercontent.com/denoland/automation/0.9.0/mod.ts";
-export * from "https://raw.githubusercontent.com/denoland/automation/0.9.0/github_actions.ts";
+export * from "https://raw.githubusercontent.com/denoland/automation/0.9.2/mod.ts";
+export * from "https://raw.githubusercontent.com/denoland/automation/0.9.2/github_actions.ts";