Add problem matcher (#4)

This commit is contained in:
Danny McCormick 2019-07-11 22:57:54 -04:00 committed by GitHub
parent 9242e91aad
commit 4fa0fd2a23
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 26 additions and 5 deletions

14
.github/java.json vendored Normal file

@ -0,0 +1,14 @@
{
"problemMatcher": [
{
"owner": "java",
"pattern": [
{
"regexp": "^Exception in thread \"(.*)\" (.*): (.*)$",
"code": 2,
"message": 3
}
]
}
]
}

@ -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);

10
package-lock.json generated

@ -5,26 +5,26 @@
"requires": true, "requires": true,
"dependencies": { "dependencies": {
"@actions/core": { "@actions/core": {
"version": "file:../setup-node/toolkit/actions-core-0.0.0.tgz", "version": "file:../../../damccorm/Documents/setup-node/toolkit/actions-core-0.0.0.tgz",
"integrity": "sha512-58ituSV1rzBMmmsWoFDnrnsT+Wm4kD/u9NgAGbPvZ7rQHWluYtD5bDbIsjDC6rKFuhqytkxDJPsF/TWBdgc/nA==", "integrity": "sha512-58ituSV1rzBMmmsWoFDnrnsT+Wm4kD/u9NgAGbPvZ7rQHWluYtD5bDbIsjDC6rKFuhqytkxDJPsF/TWBdgc/nA==",
"requires": { "requires": {
"@actions/exit": "^0.0.0" "@actions/exit": "^0.0.0"
} }
}, },
"@actions/exec": { "@actions/exec": {
"version": "file:../setup-node/toolkit/actions-exec-0.0.0.tgz", "version": "file:../../../damccorm/Documents/setup-node/toolkit/actions-exec-0.0.0.tgz",
"integrity": "sha512-HHObusC4p1RElxIlrrN0sY/cweBYl+jKm3J/XWHPQZMipgJXB/dkVhUfl4KqH3Vim7oM2KjCGSfn+vTYrqVH3A==" "integrity": "sha512-HHObusC4p1RElxIlrrN0sY/cweBYl+jKm3J/XWHPQZMipgJXB/dkVhUfl4KqH3Vim7oM2KjCGSfn+vTYrqVH3A=="
}, },
"@actions/exit": { "@actions/exit": {
"version": "file:../setup-node/toolkit/actions-exit-0.0.0.tgz", "version": "file:../../../damccorm/Documents/setup-node/toolkit/actions-exit-0.0.0.tgz",
"integrity": "sha512-vQdxFWM0/AERkC79mQ886SqPmV4joWhrSF7hiSTiJoKkE9eTjrKV5WQtp7SXv6OntrQkKX+ZjgdGpv+0rvJRCw==" "integrity": "sha512-vQdxFWM0/AERkC79mQ886SqPmV4joWhrSF7hiSTiJoKkE9eTjrKV5WQtp7SXv6OntrQkKX+ZjgdGpv+0rvJRCw=="
}, },
"@actions/io": { "@actions/io": {
"version": "file:../setup-node/toolkit/actions-io-0.0.0.tgz", "version": "file:../../../damccorm/Documents/setup-node/toolkit/actions-io-0.0.0.tgz",
"integrity": "sha512-BArfobXB/b6RjR4i/+P4UcdaqR2tPjEb2WzZf9GdKiSARQn7d301pKOZAqxA+0N11X07Lk46t/txeUBcrCNbeg==" "integrity": "sha512-BArfobXB/b6RjR4i/+P4UcdaqR2tPjEb2WzZf9GdKiSARQn7d301pKOZAqxA+0N11X07Lk46t/txeUBcrCNbeg=="
}, },
"@actions/tool-cache": { "@actions/tool-cache": {
"version": "file:../setup-node/toolkit/actions-tool-cache-0.0.0.tgz", "version": "file:../../../damccorm/Documents/setup-node/toolkit/actions-tool-cache-0.0.0.tgz",
"integrity": "sha512-NavDg5VFXDfbe9TpFuj+uOHacjg1bT3Wmo3DQuul3gsGRBEXyzhh2MWKnBZs/Zh7FE3prLmIqpbtymafNBFkIA==", "integrity": "sha512-NavDg5VFXDfbe9TpFuj+uOHacjg1bT3Wmo3DQuul3gsGRBEXyzhh2MWKnBZs/Zh7FE3prLmIqpbtymafNBFkIA==",
"requires": { "requires": {
"@actions/core": "^0.0.0", "@actions/core": "^0.0.0",

@ -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);
} }