Skip to content

Commit

Permalink
chore: update release script (#12481)
Browse files Browse the repository at this point in the history
  • Loading branch information
bartlomieju committed Oct 19, 2021
1 parent 71da814 commit a2f5931
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
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

0 comments on commit a2f5931

Please sign in to comment.