diff options
Diffstat (limited to 'platform/ios/scripts/release-notes.js')
-rwxr-xr-x | platform/ios/scripts/release-notes.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/platform/ios/scripts/release-notes.js b/platform/ios/scripts/release-notes.js index 6e4d520f14..5b2e2fa8d2 100755 --- a/platform/ios/scripts/release-notes.js +++ b/platform/ios/scripts/release-notes.js @@ -1,7 +1,7 @@ #!/usr/bin/env node const fs = require('fs'); -const child_process = require('child_process'); +const execSync = require('child_process').execSync; const ejs = require('ejs'); const _ = require('lodash'); const semver = require('semver'); @@ -11,12 +11,12 @@ const changelog = fs.readFileSync('platform/ios/CHANGELOG.md', 'utf8'); /* Find current and immediately previous releases by parsing git tags. */ -let currentVersion = child_process.execSync('git describe --tags --match=ios-v*.*.* --abbrev=0') +let currentVersion = execSync('git describe --tags --match=ios-v*.*.* --abbrev=0') .toString() .trim() .replace('ios-v', ''); -let gitTags = child_process.execSync('git tag --list ios-v*.*.*') +let gitTags = execSync('git tag --list ios-v*.*.*') .toString() .split('\n') .map(function (tag) { @@ -29,13 +29,13 @@ let previousVersion = semver.maxSatisfying(gitTags, "<" + currentVersion); Parse the raw changelog text and split it into individual releases. This regular expression: - - Matches lines starting with "## ". + - Matches lines starting with "## x.x.x". - Groups the version number. - Skips the (optional) release date. - Groups the changelog content. - - Ends when another "## " is found. + - Ends when another "## x.x.x" is found. */ -const regex = /^## (\d+\.\d+\.\d+).*?\n(.+?)(?=\n^## )/gms; +const regex = /^## (\d+\.\d+\.\d+).*?\n(.+?)(?=\n^## \d+\.\d+\.\d+.*?\n)/gms; let releaseNotes = []; while (match = regex.exec(changelog)) { |