From 8ea87afd24a5b65a917bc7b3abeafdb2c471c689 Mon Sep 17 00:00:00 2001 From: Elliot DeNolf Date: Wed, 10 Jul 2024 11:05:27 -0400 Subject: [PATCH] chore(scripts): improve release notes tag filtering --- scripts/release.ts | 2 +- scripts/utils/updateChangelog.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/release.ts b/scripts/release.ts index 400106c704..5dd565ce63 100755 --- a/scripts/release.ts +++ b/scripts/release.ts @@ -73,7 +73,7 @@ async function main() { console.log({ args }) - const fromVersion = execSync('git describe --tags --abbrev=0').toString().trim() + const fromVersion = execSync('git describe --match "v*" --tags --abbrev=0').toString().trim() const config = await loadChangelogConfig(process.cwd(), { repo: 'payloadcms/payload', diff --git a/scripts/utils/updateChangelog.ts b/scripts/utils/updateChangelog.ts index 08c0c03eac..a41e5e459d 100755 --- a/scripts/utils/updateChangelog.ts +++ b/scripts/utils/updateChangelog.ts @@ -38,7 +38,7 @@ export const updateChangelog = async (args: Args = {}): Promise const { toVersion = 'HEAD', dryRun, bump, openReleaseUrl, writeChangelog } = args const fromVersion = - args.fromVersion || execSync('git describe --tags --abbrev=0').toString().trim() + args.fromVersion || execSync('git describe --match "v*" --tags --abbrev=0').toString().trim() const tag = fromVersion.match(/-(\w+)\.\d+$/)?.[1] || 'latest'