This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Conflicts: mapbox-gl-js platform/android/CHANGELOG.md platform/android/gradle/dependencies.gradle platform/ios/CHANGELOG.md platform/ios/Mapbox-iOS-SDK-nightly-dynamic.podspec platform/ios/Mapbox-iOS-SDK-symbols.podspec platform/ios/Mapbox-iOS-SDK.podspec platform/node/test/ignores.json src/mbgl/geometry/feature_index.cpp src/mbgl/geometry/feature_index.hpp src/mbgl/layout/symbol_layout.cpp
- Loading branch information
Showing
12 changed files
with
57 additions
and
261 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/usr/bin/env node | ||
|
||
const fs = require('fs'); | ||
const ejs = require('ejs'); | ||
const _ = require('lodash'); | ||
const semver = require('semver'); | ||
|
||
const changelog = fs.readFileSync('platform/ios/CHANGELOG.md', 'utf8'); | ||
|
||
// This regular expression parses the changelog for individual releases: | ||
// - Matches lines starting with "## ". | ||
// - Groups the version number. | ||
// - Skips the (optional) release date. | ||
// - Groups the changelog content. | ||
// - Ends when another "## " is found. | ||
const regex = /^## (\d+\.\d+\.\d+).*?\n(.+?)(?=\n^## )/gms; | ||
|
||
let releases = []; | ||
while (match = regex.exec(changelog)) { | ||
releases.push({ | ||
'version': match[1], | ||
'changelog': match[2].trim(), | ||
}); | ||
} | ||
|
||
const currentRelease = releases[0]; | ||
|
||
const versions = _.map(releases, 'version'); | ||
const previousVersion = semver.maxSatisfying(versions, "<" + currentRelease.version); | ||
|
||
const releaseNotes = ejs.render(fs.readFileSync('platform/ios/scripts/release-notes.md.ejs', 'utf8'), { | ||
'currentVersion': currentRelease.version, | ||
'previousVersion': previousVersion, | ||
'changelog': currentRelease.changelog, | ||
}); | ||
|
||
process.stdout.write(releaseNotes); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<% | ||
const CURRENTVERSION = locals.currentVersion; | ||
const PREVIOUSVERSION = locals.previousVersion; | ||
const CHANGELOG = locals.changelog; | ||
-%> | ||
[Changes](https://github.com/mapbox/mapbox-gl-native/compare/ios-v<%-PREVIOUSVERSION%>...ios-v<%-CURRENTVERSION%>) since [Mapbox Maps SDK for iOS v<%-PREVIOUSVERSION%>](https://github.com/mapbox/mapbox-gl-native/releases/tag/ios-v<%-PREVIOUSVERSION%>): | ||
|
||
<%-CHANGELOG%> | ||
|
||
Documentation is [available online](https://www.mapbox.com/ios-sdk/api/<%-CURRENTVERSION%>/) or as part of the download. |
This file was deleted.
Oops, something went wrong.