Skip to content

Commit 39e8731

Browse files
aduh95ruyadorno
authored andcommitted
tools: include current release in the list of released versions
PR-URL: #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>
1 parent 00a3b5f commit 39e8731

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

.github/workflows/linters.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ jobs:
107107
- name: Get release version numbers
108108
if: ${{ github.event.pull_request && github.event.pull_request.base.ref == github.event.pull_request.base.repo.default_branch }}
109109
id: get-released-versions
110-
run: ./tools/lint-md/list-released-versions-from-changelogs.mjs
110+
run: ./tools/lint-md/list-released-versions-from-changelogs.mjs >> $GITHUB_OUTPUT
111111
- name: Lint markdown files
112112
run: |
113113
echo "::add-matcher::.github/workflows/remark-lint-problem-matcher.json"

tools/lint-md/list-released-versions-from-changelogs.mjs

+4-2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ async function getVersionsFromFile(file) {
2020
return;
2121
} else if (toc && line.startsWith('<a')) {
2222
result.push(line.slice(line.indexOf('>') + 1, -'</a><br/>'.length));
23+
} else if (toc && line.startsWith('<b><a')) {
24+
result.push(line.slice(line.indexOf('>', 3) + 1, -'</a></b><br/>'.length));
2325
}
2426
}
2527
}
@@ -30,11 +32,11 @@ const dir = await fs.promises.opendir(dataFolder);
3032
for await (const dirent of dir) {
3133
if (dirent.isFile()) {
3234
filesToCheck.push(
33-
getVersionsFromFile(new URL(`./${dirent.name}`, dataFolder))
35+
getVersionsFromFile(new URL(dirent.name, dataFolder))
3436
);
3537
}
3638
}
3739

3840
await Promise.all(filesToCheck);
3941

40-
console.log(`::set-output name=NODE_RELEASED_VERSIONS::${result.join(',')}`);
42+
console.log(`NODE_RELEASED_VERSIONS=${result.join(',')}`);

0 commit comments

Comments
 (0)