chore(scripts): improve release notes tag filtering

This commit is contained in:
Elliot DeNolf
2024-07-10 11:05:27 -04:00
parent 89ae5bbd22
commit 8ea87afd24
2 changed files with 2 additions and 2 deletions

View File

@@ -73,7 +73,7 @@ async function main() {
console.log({ args }) 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(), { const config = await loadChangelogConfig(process.cwd(), {
repo: 'payloadcms/payload', repo: 'payloadcms/payload',

View File

@@ -38,7 +38,7 @@ export const updateChangelog = async (args: Args = {}): Promise<ChangelogResult>
const { toVersion = 'HEAD', dryRun, bump, openReleaseUrl, writeChangelog } = args const { toVersion = 'HEAD', dryRun, bump, openReleaseUrl, writeChangelog } = args
const fromVersion = 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' const tag = fromVersion.match(/-(\w+)\.\d+$/)?.[1] || 'latest'