mirror of
https://github.com/maputnik/editor.git
synced 2026-01-09 15:00:01 +00:00
Previously the desktop build lived in a separate repo and had to
download a released version of the maputnik editor source code. Now that
both live in the same repo, the desktop version can simply run the
maputnik build command and use those generated files.
This commit also removes the ci-desktop workflow, which is not needed.
The regular ci workflow already built the desktop version (this commit
also fixes that build).
Fixes #919
If this works for you all, it would be lovely to create a new tag or
release on GitHub for two reasons:
1. So the latest binaries are easier to locate, and
2. So I can update my [submission to
homebrew](6e536ff007)
to make installation easier (for os x users at least)
49 lines
1.5 KiB
JavaScript
49 lines
1.5 KiB
JavaScript
#!/usr/bin/env node
|
|
|
|
// Copied from maplibre/maplibre-gl-js
|
|
// https://github.com/maplibre/maplibre-gl-js/blob/bc70bc559cea5c987fa1b79fd44766cef68bbe28/build/release-notes.js
|
|
|
|
import * as fs from 'fs';
|
|
|
|
const changelogPath = 'CHANGELOG.md';
|
|
const changelog = fs.readFileSync(changelogPath, 'utf8');
|
|
|
|
/*
|
|
Parse the raw changelog text and split it into individual releases.
|
|
|
|
This regular expression:
|
|
- Matches lines starting with "## x.x.x".
|
|
- Groups the version number.
|
|
- Skips the (optional) release date.
|
|
- Groups the changelog content.
|
|
- Ends when another "## x.x.x" is found.
|
|
*/
|
|
const regex = /^## (\d+\.\d+\.\d+.*?)\n(.+?)(?=\n^## \d+\.\d+\.\d+.*?\n)/gms;
|
|
|
|
let releaseNotes = [];
|
|
let match;
|
|
// eslint-disable-next-line no-cond-assign
|
|
while (match = regex.exec(changelog)) {
|
|
releaseNotes.push({
|
|
'version': match[1],
|
|
'changelog': match[2].trim(),
|
|
});
|
|
}
|
|
|
|
const latest = releaseNotes[0];
|
|
const previous = releaseNotes[1];
|
|
|
|
// Print the release notes template.
|
|
|
|
let header = 'Changes since previous version'
|
|
if (previous) {
|
|
header = `https://github.com/maplibre/maputnik
|
|
[Changes](https://github.com/maplibre/maputnik/compare/v${previous.version}...v${latest.version}) since [Maputnik v${previous.version}](https://github.com/maplibre/maputnik/releases/tag/v${previous.version})`
|
|
}
|
|
const templatedReleaseNotes = `${header}
|
|
|
|
${latest.changelog}
|
|
|
|
// eslint-disable-next-line eol-last
|
|
process.stdout.write(templatedReleaseNotes.trimEnd());
|