tools: include current release in the list of released versions
PR-URL: https://github.com/nodejs/node/pull/45463 Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
parent
badc631d77
commit
f2ee81839a
2
.github/workflows/linters.yml
vendored
2
.github/workflows/linters.yml
vendored
@ -107,7 +107,7 @@ jobs:
|
||||
- name: Get release version numbers
|
||||
if: ${{ github.event.pull_request && github.event.pull_request.base.ref == github.event.pull_request.base.repo.default_branch }}
|
||||
id: get-released-versions
|
||||
run: ./tools/lint-md/list-released-versions-from-changelogs.mjs
|
||||
run: ./tools/lint-md/list-released-versions-from-changelogs.mjs >> $GITHUB_OUTPUT
|
||||
- name: Lint markdown files
|
||||
run: |
|
||||
echo "::add-matcher::.github/workflows/remark-lint-problem-matcher.json"
|
||||
|
@ -20,6 +20,8 @@ async function getVersionsFromFile(file) {
|
||||
return;
|
||||
} else if (toc && line.startsWith('<a')) {
|
||||
result.push(line.slice(line.indexOf('>') + 1, -'</a><br/>'.length));
|
||||
} else if (toc && line.startsWith('<b><a')) {
|
||||
result.push(line.slice(line.indexOf('>', 3) + 1, -'</a></b><br/>'.length));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -30,11 +32,11 @@ const dir = await fs.promises.opendir(dataFolder);
|
||||
for await (const dirent of dir) {
|
||||
if (dirent.isFile()) {
|
||||
filesToCheck.push(
|
||||
getVersionsFromFile(new URL(`./${dirent.name}`, dataFolder))
|
||||
getVersionsFromFile(new URL(dirent.name, dataFolder))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
await Promise.all(filesToCheck);
|
||||
|
||||
console.log(`::set-output name=NODE_RELEASED_VERSIONS::${result.join(',')}`);
|
||||
console.log(`NODE_RELEASED_VERSIONS=${result.join(',')}`);
|
||||
|
Loading…
x
Reference in New Issue
Block a user