Skip to content

Commit 38f7144

Browse files
jariy17jariy17
andauthored
fix(scripts): filter non-version tags in changelog auto-generation (#1444)
The prerelease-tarball workflow creates a floating `prerelease` tag on every push to main. When bump-version.ts auto-generates the changelog, `git describe --tags --abbrev=0` picks up this tag instead of the last version tag, resulting in `git log prerelease..HEAD` returning 0 commits and an empty changelog section. Add `--match 'v*'` to only consider version tags. Co-authored-by: jariy17 <tjariy+jariy17@users.noreply.github.com>
1 parent dbe34ac commit 38f7144

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

scripts/bump-version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ function getGitLog(sinceTag?: string): string {
183183
} else {
184184
// Try to get the last tag
185185
try {
186-
const lastTag = execSync('git describe --tags --abbrev=0', { encoding: 'utf-8' }).trim();
186+
const lastTag = execSync("git describe --tags --abbrev=0 --match 'v*'", { encoding: 'utf-8' }).trim();
187187
cmd += ` ${lastTag}..HEAD`;
188188
} catch {
189189
// No tags exist, get last 20 commits

0 commit comments

Comments
 (0)