mirror of
https://github.com/actions/setup-java.git
synced 2025-04-11 07:45:55 +08:00
Add matcher
This commit is contained in:
parent
35ebce62df
commit
de5d0c1f9a
16
.github/java.json
vendored
Normal file
16
.github/java.json
vendored
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"problemMatcher": [
|
||||||
|
{
|
||||||
|
"owner": "java",
|
||||||
|
"pattern": [
|
||||||
|
{
|
||||||
|
"regexp": "^Exception in thread \".*\" (.*): (.*)\\n\\s*at .*\\((.*):(\\d*)\\)$",
|
||||||
|
"severity": 1,
|
||||||
|
"message": 2,
|
||||||
|
"file": 3,
|
||||||
|
"line": 4
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -17,6 +17,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
const core = __importStar(require("@actions/core"));
|
const core = __importStar(require("@actions/core"));
|
||||||
const installer = __importStar(require("./installer"));
|
const installer = __importStar(require("./installer"));
|
||||||
|
const path = __importStar(require("path"));
|
||||||
function run() {
|
function run() {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
try {
|
try {
|
||||||
@ -24,6 +25,8 @@ function run() {
|
|||||||
const arch = core.getInput('architecture', { required: true });
|
const arch = core.getInput('architecture', { required: true });
|
||||||
const jdkFile = core.getInput('jdkFile', { required: true });
|
const jdkFile = core.getInput('jdkFile', { required: true });
|
||||||
yield installer.getJava(version, arch, jdkFile);
|
yield installer.getJava(version, arch, jdkFile);
|
||||||
|
const matchersPath = path.join(__dirname, '..', '.github');
|
||||||
|
console.log(`##[add-matcher]${path.join(matchersPath, 'java.json')}`);
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
core.setFailed(error.message);
|
core.setFailed(error.message);
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import * as core from '@actions/core';
|
import * as core from '@actions/core';
|
||||||
import * as installer from './installer';
|
import * as installer from './installer';
|
||||||
|
import * as path from 'path';
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
try {
|
try {
|
||||||
@ -8,6 +9,9 @@ async function run() {
|
|||||||
const jdkFile = core.getInput('jdkFile', {required: true});
|
const jdkFile = core.getInput('jdkFile', {required: true});
|
||||||
|
|
||||||
await installer.getJava(version, arch, jdkFile);
|
await installer.getJava(version, arch, jdkFile);
|
||||||
|
|
||||||
|
const matchersPath = path.join(__dirname, '..', '.github');
|
||||||
|
console.log(`##[add-matcher]${path.join(matchersPath, 'java.json')}`);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
core.setFailed(error.message);
|
core.setFailed(error.message);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user