From 5f73af8556d353f5d58254422aed1fb466a901f4 Mon Sep 17 00:00:00 2001 From: Konstantin Obenland Date: Mon, 27 Jan 2025 16:44:41 -0600 Subject: [PATCH] Release Script: Replace `@since` versions (#1221) * Update regex * Release Script: Replace @since versions Also fixes migration regex * Revert test changes --- bin/release.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/bin/release.js b/bin/release.js index f022e98df..367cb1158 100644 --- a/bin/release.js +++ b/bin/release.js @@ -99,11 +99,22 @@ async function createRelease(version) { updateVersionInFile('includes/class-migration.php', version, [ { - search: /version_compare\([^,]+,\s*['"]unreleased['"]/gi, + search: /(?])/g, replace: (match) => match.replace(/unreleased/i, version) } ]); + const phpFiles = execWithOutput('find . -name "*.php"').split('\n'); + + phpFiles.forEach((filePath) => { + updateVersionInFile(filePath, version, [ + { + search: /@since unreleased/g, + replace: `@since ${version}` + } + ]); + }); + // Update CHANGELOG.md updateChangelog(version);