mirror of
https://github.com/actions/setup-java.git
synced 2025-04-21 10:26:46 +00:00
rebuild
This commit is contained in:
parent
a2ae8283cb
commit
10d2aa6bfd
2 changed files with 10 additions and 4 deletions
|
@ -1,7 +1,12 @@
|
|||
import fs from 'fs';
|
||||
import * as core from '@actions/core';
|
||||
import * as auth from './auth';
|
||||
import { getBooleanInput, isCacheFeatureAvailable, getVersionFromFileContent, avoidOldNotation } from './util';
|
||||
import {
|
||||
getBooleanInput,
|
||||
isCacheFeatureAvailable,
|
||||
getVersionFromFileContent,
|
||||
avoidOldNotation
|
||||
} from './util';
|
||||
import * as toolchains from './toolchains';
|
||||
import * as constants from './constants';
|
||||
import { restore } from './cache';
|
||||
|
@ -120,4 +125,3 @@ interface installerInputsOptions {
|
|||
jdkFile: string;
|
||||
toolchainIds: Array<string>;
|
||||
}
|
||||
|
||||
|
|
|
@ -100,8 +100,10 @@ export function isCacheFeatureAvailable(): boolean {
|
|||
return true;
|
||||
}
|
||||
|
||||
|
||||
export function getVersionFromFileContent(content: string, distributionName: string): string | null {
|
||||
export function getVersionFromFileContent(
|
||||
content: string,
|
||||
distributionName: string
|
||||
): string | null {
|
||||
const javaVersionRegExp = /(?<version>(?<=(^|\s|\-))(\d+\S*))(\s|$)/;
|
||||
const fileContent = content.match(javaVersionRegExp)?.groups?.version
|
||||
? (content.match(javaVersionRegExp)?.groups?.version as string)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue