Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use ESM in release-notes Android script #2773

Merged
merged 1 commit into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/android-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ jobs:
id: prepare_release
run: |
RELEASE_NOTES_PATH="${PWD}/release_notes.txt"
./scripts/release-notes.js > "${RELEASE_NOTES_PATH}"
node scripts/release-notes.mjs > "${RELEASE_NOTES_PATH}"
echo release_notes="${RELEASE_NOTES_PATH}" >> "$GITHUB_OUTPUT"
echo version_tag="$( git describe --tags --match=android-v*.*.* --abbrev=0 )" >> "$GITHUB_OUTPUT"
shell: bash
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
#!/usr/bin/env node

const fs = require('fs');
const execSync = require('child_process').execSync;
const ejs = require('ejs');
const _ = require('lodash');
const semver = require('semver');
import fs from 'node:fs';
import { execSync } from 'node:child_process';
import ejs from 'ejs';
import _ from 'lodash';
import semver from 'semver';

const changelogPath = 'CHANGELOG.md';
const changelog = fs.readFileSync(changelogPath, 'utf8');
Expand Down Expand Up @@ -39,6 +37,7 @@ let previousVersion = semver.maxSatisfying(gitTags, "<" + currentVersion);
const regex = /^## (\d+\.\d+\.\d+).*?\n(.+?)(?=\n^## \d+\.\d+\.\d+.*?\n)/gms;

let releaseNotes = [];
let match;
while (match = regex.exec(changelog)) {
releaseNotes.push({
'version': match[1],
Expand Down
Loading