Skip to content

Commit 98173be

Browse files
committed
Add a comment about lib/defaults.json
1 parent f6091a0 commit 98173be

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

.github/actions/update-bundle/index.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,19 @@ function getCodeQLCliVersionForRelease(release): string {
3434
}
3535
return cliVersionsFromMarkerFiles[0];
3636
}
37-
37+
3838
async function getBundleInfoFromRelease(release): Promise<BundleInfo> {
3939
return {
4040
bundleVersion: release.tag_name.substring(CODEQL_BUNDLE_PREFIX.length),
4141
cliVersion: getCodeQLCliVersionForRelease(release)
4242
};
4343
}
44-
44+
4545
async function getNewDefaults(currentDefaults: Defaults): Promise<Defaults> {
4646
const release = github.context.payload.release;
4747
console.log('Updating default bundle as a result of the following release: ' +
4848
`${JSON.stringify(release)}.`)
49-
49+
5050
const bundleInfo = await getBundleInfoFromRelease(release);
5151
return {
5252
bundleVersion: bundleInfo.bundleVersion,
@@ -55,14 +55,15 @@ function getCodeQLCliVersionForRelease(release): string {
5555
priorCliVersion: currentDefaults.cliVersion
5656
};
5757
}
58-
58+
5959
async function main() {
6060
const previousDefaults: Defaults = JSON.parse(fs.readFileSync('../../../src/defaults.json', 'utf8'));
6161
const newDefaults = await getNewDefaults(previousDefaults);
62+
// Update the source file in the repository. Calling workflows should subsequently rebuild
63+
// the Action to update `lib/defaults.json`.
6264
fs.writeFileSync('../../../src/defaults.json', JSON.stringify(newDefaults, null, 2) + "\n");
6365
}
64-
66+
6567
// Ideally, we'd await main() here, but that doesn't work well with `ts-node`.
6668
// So instead we rely on the fact that Node won't exit until the event loop is empty.
6769
main();
68-

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy