mirror of
https://github.com/denoland/deno.git
synced 2024-12-22 07:14:47 -05:00
chore: update release script (#12481)
This commit is contained in:
parent
71da814073
commit
a2f5931510
3 changed files with 15 additions and 4 deletions
|
@ -65,8 +65,7 @@ cut.**
|
||||||
9. If you are doing a patch release, answer `y` to the _Increment patch?_
|
9. If you are doing a patch release, answer `y` to the _Increment patch?_
|
||||||
prompt.
|
prompt.
|
||||||
|
|
||||||
10. Use the output of the above command to update `Releases.md` (removing
|
10. Use the output of the above command to update `Releases.md`
|
||||||
`refactor`, `test` and `doc` commits)
|
|
||||||
|
|
||||||
11. Create a PR for these changes.
|
11. Create a PR for these changes.
|
||||||
|
|
||||||
|
|
|
@ -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.
|
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
|
||||||
import {
|
import {
|
||||||
DenoWorkspace,
|
DenoWorkspace,
|
||||||
|
|
|
@ -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) {
|
export function formatGitLogForMarkdown(text: string) {
|
||||||
return text.split(/\r?\n/)
|
return text.split(/\r?\n/)
|
||||||
.map((line) => line.replace(/^[a-f0-9]{9} /i, "").trim())
|
.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()
|
.sort()
|
||||||
.map((line) => `- ${line}`)
|
.map((line) => `- ${line}`)
|
||||||
.join("\n");
|
.join("\n");
|
||||||
|
|
Loading…
Reference in a new issue