Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update release script #12481

Merged
merged 4 commits into from
Oct 19, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions tools/cut_a_release.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion tools/release/03_bump_cli_version.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
14 changes: 13 additions & 1 deletion tools/release/helpers/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down