Remove ts-ignore

pull/226/head
Webber 2021-03-13 23:45:07 +01:00
parent 2c892a612e
commit 110b8ed402
4 changed files with 46 additions and 46 deletions

11
dist/index.js vendored
View File

@ -37,10 +37,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
}; };
Object.defineProperty(exports, "__esModule", ({ value: true })); Object.defineProperty(exports, "__esModule", ({ value: true }));
const core = __importStar(__webpack_require__(42186)); const core = __importStar(__webpack_require__(42186));
// @ts-ignore
const model_1 = __webpack_require__(41359); const model_1 = __webpack_require__(41359);
function run() { function run() {
return __awaiter(this, void 0, void 0, function* () { return __awaiter(this, void 0, void 0, function* () {
try {
model_1.Action.checkCompatibility(); model_1.Action.checkCompatibility();
model_1.Cache.verify(); model_1.Cache.verify();
const { dockerfile, workspace, actionFolder } = model_1.Action; const { dockerfile, workspace, actionFolder } = model_1.Action;
@ -58,11 +58,13 @@ function run() {
} }
// Set output // Set output
yield model_1.Output.setBuildVersion(buildParameters.buildVersion); yield model_1.Output.setBuildVersion(buildParameters.buildVersion);
}
catch (error) {
core.setFailed(error.message);
}
}); });
} }
run().catch((error) => { run();
core.setFailed(error.message);
});
/***/ }), /***/ }),
@ -1507,7 +1509,6 @@ class Versioning {
return __awaiter(this, void 0, void 0, function* () { return __awaiter(this, void 0, void 0, function* () {
const description = yield this.getVersionDescription(); const description = yield this.getVersionDescription();
try { try {
// @ts-ignore
const [match, tag, commits, hash] = this.descriptionRegex1.exec(description); const [match, tag, commits, hash] = this.descriptionRegex1.exec(description);
return { return {
match, match,

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -1,9 +1,8 @@
import * as core from '@actions/core'; import * as core from '@actions/core';
// @ts-ignore
import { Action, BuildParameters, Cache, Docker, ImageTag, Kubernetes, Output } from './model'; import { Action, BuildParameters, Cache, Docker, ImageTag, Kubernetes, Output } from './model';
async function run() { async function run() {
try {
Action.checkCompatibility(); Action.checkCompatibility();
Cache.verify(); Cache.verify();
@ -23,8 +22,9 @@ async function run() {
// Set output // Set output
await Output.setBuildVersion(buildParameters.buildVersion); await Output.setBuildVersion(buildParameters.buildVersion);
} catch (error) {
core.setFailed(error.message);
}
} }
run().catch((error) => { run();
core.setFailed(error.message);
});

View File

@ -171,8 +171,7 @@ export default class Versioning {
const description = await this.getVersionDescription(); const description = await this.getVersionDescription();
try { try {
// @ts-ignore const [match, tag, commits, hash] = this.descriptionRegex1.exec(description) as RegExpExecArray;
const [match, tag, commits, hash] = this.descriptionRegex1.exec(description);
return { return {
match, match,
@ -182,7 +181,7 @@ export default class Versioning {
}; };
} catch { } catch {
try { try {
const [match, tag, commits, hash] = this.descriptionRegex2.exec(description); const [match, tag, commits, hash] = this.descriptionRegex2.exec(description) as RegExpExecArray;
return { return {
match, match,
@ -192,7 +191,7 @@ export default class Versioning {
}; };
} catch { } catch {
try { try {
const [match, tag, commits, hash] = this.descriptionRegex3.exec(description); const [match, tag, commits, hash] = this.descriptionRegex3.exec(description) as RegExpExecArray;
return { return {
match, match,