Skip to content

Commit d29eddb

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

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-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: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,13 @@ import {
8888
} from "./util";
8989
import { checkWorkflow } from "./workflow";
9090

91+
/**
92+
* First version of CodeQL where the Java extractor safely supports the option to minimize
93+
* dependency jars. Note: some earlier versions of the extractor will respond to the corresponding
94+
* option, but may rewrite jars in ways that lead to extraction errors.
95+
*/
96+
export const CODEQL_VERSION_JAR_MINIMIZATION = "2.23.0";
97+
9198
/**
9299
* Sends a status report indicating that the `init` Action is starting.
93100
*
@@ -651,7 +658,7 @@ async function run() {
651658
`${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.`,
652659
);
653660
} else if (
654-
(await codeQlVersionAtLeast(codeql, "2.23.0")) && // First version of the extractor to safely support this option
661+
(await codeQlVersionAtLeast(codeql, CODEQL_VERSION_JAR_MINIMIZATION)) &&
655662
config.dependencyCachingEnabled &&
656663
config.buildMode === BuildMode.None &&
657664
config.languages.includes(KnownLanguage.java)

0 commit comments

Comments
 (0)