@ioffice/tc-builder
Advanced tools
Comparing version 1.3.0-beta.1806152250 to 1.3.0-beta.1806152302
@@ -85,3 +85,3 @@ /** | ||
githubRequest(endpoint: string, method?: string, body?: any): RequestPromise; | ||
failBuild(msg: string | Error): void; | ||
failBuild(step: string, err: string | Error): void; | ||
/** | ||
@@ -88,0 +88,0 @@ * This method is called right before one of the life cycle methods gets called. |
@@ -174,6 +174,7 @@ "use strict"; | ||
}; | ||
AbstractBuilder.prototype.failBuild = function (msg) { | ||
AbstractBuilder.prototype.failBuild = function (step, err) { | ||
if (process.env['TEAMCITY']) { | ||
var m = typeof msg === 'string' ? msg : msg.message; | ||
console.log("##teamcity[buildProblem description='" + this.util.escapeTC(m) + "']"); | ||
var m = typeof err === 'string' ? err : err.message; | ||
var desc = "Failure in " + step + " step: " + m; | ||
console.log("##teamcity[buildProblem description='" + this.util.escapeTC(desc) + "']"); | ||
} | ||
@@ -180,0 +181,0 @@ }; |
{ | ||
"name": "@ioffice/tc-builder", | ||
"version": "1.3.0-beta.1806152250", | ||
"version": "1.3.0-beta.1806152302", | ||
"description": "iOFFICE TeamCity Builder", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -79,5 +79,5 @@ #!/usr/bin/env node | ||
err_1 = _a.sent(); | ||
builder.failBuild(err_1); | ||
builder.tasks.error(err_1); | ||
builder.tasks.log("Process failed in the '" + builder.step + "' step."); | ||
builder.failBuild(builder.step, err_1); | ||
exitNumber = 1; | ||
@@ -84,0 +84,0 @@ return [3 /*break*/, 9]; |
90052
2071