mirror of
https://github.com/actions/setup-java.git
synced 2025-04-19 17:36:45 +00:00
patch to extract file from other location
This commit is contained in:
parent
5896cecc08
commit
a847c75719
3 changed files with 17 additions and 0 deletions
|
@ -119,6 +119,13 @@ export function getVersionFromFileContent(
|
|||
versionFile: string
|
||||
): string | null {
|
||||
let javaVersionRegExp: RegExp;
|
||||
const path = require('path');
|
||||
|
||||
function getFileName(versionFile: string) {
|
||||
return path.basename(versionFile);
|
||||
}
|
||||
|
||||
const versionFileName = getFileName(versionFile);
|
||||
if (versionFile == '.tool-versions') {
|
||||
javaVersionRegExp =
|
||||
/^(java\s+)(?:\S*-)?v?(?<version>(\d+)(\.\d+)?(\.\d+)?(\+\d+)?(-ea(\.\d+)?)?)$/m;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue