Skip to content

Commit 4828993

Browse files
committed
Extract version number to constant
1 parent 805b7e1 commit 4828993

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

lib/init-action.js

Lines changed: 11 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/init-action.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ import {
8888
} from "./util";
8989
import { checkWorkflow } from "./workflow";
9090

91+
/** First version of CodeQL where the Java extractor safely supports the option to minimize dependency jars. */
92+
export const CODEQL_VERSION_JAR_MINIMIZATION = "2.23.0";
93+
9194
/**
9295
* Sends a status report indicating that the `init` Action is starting.
9396
*
@@ -651,7 +654,7 @@ async function run() {
651654
`${EnvVar.JAVA_EXTRACTOR_MINIMIZE_DEPENDENCY_JARS} is already set to '${process.env[EnvVar.JAVA_EXTRACTOR_MINIMIZE_DEPENDENCY_JARS]}', so the Action will not override it.`,
652655
);
653656
} else if (
654-
(await codeQlVersionAtLeast(codeql, "2.23.0")) && // First version of the extractor to safely support this option
657+
(await codeQlVersionAtLeast(codeql, CODEQL_VERSION_JAR_MINIMIZATION)) &&
655658
config.dependencyCachingEnabled &&
656659
config.buildMode === BuildMode.None &&
657660
config.languages.includes(KnownLanguage.java)

0 commit comments

Comments
 (0)