-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
0.12 back-port: chore: fix changelog generation (#4828)
* chore: fix changelog generation Aligned with `draft-release-notes.ts` script. Used explicit version range instead of experimental `--next-tag` flag. * refactor(chore): extract helper to generate changelog
- Loading branch information
1 parent
35aa729
commit 33be93e
Showing
3 changed files
with
27 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/usr/bin/env ts-node | ||
|
||
import execa from "execa" | ||
import { resolve } from "path" | ||
|
||
const gardenRoot = resolve(__dirname, "..") | ||
|
||
export async function getChangelog(curReleaseTag: string) { | ||
try { | ||
return ( | ||
await execa( | ||
"git-chglog", | ||
["--tag-filter-pattern", "^\\d+\\.\\d+\\.\\d+$", "--sort", "semver", `${curReleaseTag}..${curReleaseTag}`], | ||
{ cwd: gardenRoot } | ||
) | ||
).stdout | ||
} catch (err) { | ||
throw new Error(`Error generating changelog: ${err}`) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters