From a2f5931510d6778f9f9176d2e2ef7f61ea1adceb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Tue, 19 Oct 2021 03:12:47 +0200 Subject: [PATCH] chore: update release script (#12481) --- tools/cut_a_release.md | 3 +-- tools/release/03_bump_cli_version.ts | 2 +- tools/release/helpers/helpers.ts | 14 +++++++++++++- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/tools/cut_a_release.md b/tools/cut_a_release.md index 67b58d2232..3747647ba5 100644 --- a/tools/cut_a_release.md +++ b/tools/cut_a_release.md @@ -65,8 +65,7 @@ cut.** 9. If you are doing a patch release, answer `y` to the _Increment patch?_ prompt. -10. Use the output of the above command to update `Releases.md` (removing - `refactor`, `test` and `doc` commits) +10. Use the output of the above command to update `Releases.md` 11. Create a PR for these changes. diff --git a/tools/release/03_bump_cli_version.ts b/tools/release/03_bump_cli_version.ts index d652f933d7..b62e2b0592 100755 --- a/tools/release/03_bump_cli_version.ts +++ b/tools/release/03_bump_cli_version.ts @@ -1,4 +1,4 @@ -#!/usr/bin/env -S deno run --allow-read --allow-write --allow-run="cargo,git" +#!/usr/bin/env -S deno run --allow-read --allow-write --allow-run=cargo,git // Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. import { DenoWorkspace, diff --git a/tools/release/helpers/helpers.ts b/tools/release/helpers/helpers.ts index c034af5460..adb6eb83ee 100644 --- a/tools/release/helpers/helpers.ts +++ b/tools/release/helpers/helpers.ts @@ -28,10 +28,22 @@ export function getGitLogFromTag(directory: string, tagName: string) { }); } +const IGNORED_COMMIT_PREFIX = [ + "build", + "chore", + "ci", + "docs", + "refactor", + "test", +]; + export function formatGitLogForMarkdown(text: string) { return text.split(/\r?\n/) .map((line) => line.replace(/^[a-f0-9]{9} /i, "").trim()) - .filter((l) => !l.startsWith("chore") && l.length > 0) + .filter((l) => { + return !IGNORED_COMMIT_PREFIX.some((prefix) => l.startsWith(prefix)) && + l.length > 0; + }) .sort() .map((line) => `- ${line}`) .join("\n");