diff options
author | Jason Wray <jason@mapbox.com> | 2018-08-21 11:53:08 -0400 |
---|---|---|
committer | Jason Wray <jason@mapbox.com> | 2018-08-22 13:05:49 -0400 |
commit | d31df6a615aee731199e992cf8e1d1f8e87daf66 (patch) | |
tree | 8ccd6fbfd873567323d2bf2db6c5dbb67f93807b /platform/ios | |
parent | be83bb76b85d37d9b9fc10f60e038e5ff426b200 (diff) | |
download | qtlocation-mapboxgl-d31df6a615aee731199e992cf8e1d1f8e87daf66.tar.gz |
[ios, build] Fix bad changelog header and improve handling
Also, specifically require `execSync`.
Diffstat (limited to 'platform/ios')
-rw-r--r-- | platform/ios/CHANGELOG.md | 2 | ||||
-rwxr-xr-x | platform/ios/scripts/release-notes.js | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md index bfc5e77af8..96dcd86f8c 100644 --- a/platform/ios/CHANGELOG.md +++ b/platform/ios/CHANGELOG.md @@ -22,7 +22,7 @@ Mapbox welcomes participation and contributions from everyone. Please read [CONT * Added a new option to `MGLSymbolPlacement`, `MGLSymbolPlacementLineCenter`, that places the label relative to the center of the geometry. ([#12337](https://github.com/mapbox/mapbox-gl-native/pull/12337)) * Added a `MGLShapeSourceOptionLineDistanceMetrics` property that enables or disables calculating line distance metrics. -## User location +### User location * Added an `MGLMapView.locationManager` property and `MGLLocationManager` protocol for tracking user location using a custom alternative to `CLLocationManager`. ([#12013](https://github.com/mapbox/mapbox-gl-native/pull/12013)) * Fixed a crash that occurred when `MMELocationManager` was deallocated and the delegate was reporting updates. ([#12542](https://github.com/mapbox/mapbox-gl-native/pull/12542)) 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)) { |