mirror of
https://github.com/PaulHatch/semantic-version.git
synced 2025-12-27 04:58:17 +00:00
Fix for diagnostic output
This commit is contained in:
parent
4fafb1f5a0
commit
5f6f89c4e0
7 changed files with 12 additions and 9 deletions
7
dist/index.js
vendored
7
dist/index.js
vendored
|
|
@ -93,7 +93,7 @@ const DebugManager_1 = __nccwpck_require__(1823);
|
|||
class ConfigurationProvider {
|
||||
constructor(config) {
|
||||
this.config = config;
|
||||
DebugManager_1.DebugManager.getInstance().setDebugEnabled(config.debug);
|
||||
DebugManager_1.DebugManager.getInstance().initializeConfig(config);
|
||||
}
|
||||
GetCurrentCommitResolver() { return new DefaultCurrentCommitResolver_1.DefaultCurrentCommitResolver(this.config); }
|
||||
GetLastReleaseResolver() { return new DefaultLastReleaseResolver_1.DefaultLastReleaseResolver(this.config); }
|
||||
|
|
@ -153,7 +153,7 @@ class DebugManager {
|
|||
if (config.debug) {
|
||||
this.setDebugEnabled(true);
|
||||
}
|
||||
else if (!!config.replay) {
|
||||
else if (config.replay.length > 0) {
|
||||
this.replayFromDiagnostics(config.replay);
|
||||
}
|
||||
}
|
||||
|
|
@ -508,7 +508,7 @@ const ConfigurationProvider_1 = __nccwpck_require__(2614);
|
|||
const core = __importStar(__nccwpck_require__(2186));
|
||||
const VersionType_1 = __nccwpck_require__(895);
|
||||
function setOutput(versionResult) {
|
||||
const { major, minor, patch, increment, versionType, formattedVersion, versionTag, changed, isTagged, authors, currentCommit, previousCommit, previousVersion } = versionResult;
|
||||
const { major, minor, patch, increment, versionType, formattedVersion, versionTag, changed, isTagged, authors, currentCommit, previousCommit, previousVersion, debugOutput } = versionResult;
|
||||
const repository = process.env.GITHUB_REPOSITORY;
|
||||
if (!changed) {
|
||||
core.info('No changes detected for this commit');
|
||||
|
|
@ -530,6 +530,7 @@ function setOutput(versionResult) {
|
|||
core.setOutput("previous_commit", previousCommit);
|
||||
core.setOutput("previous_version", previousVersion);
|
||||
core.setOutput("current_commit", currentCommit);
|
||||
core.setOutput("debug_output", debugOutput);
|
||||
}
|
||||
function run() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
|
|
|
|||
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
|
|
@ -37,7 +37,7 @@ class ActionConfig {
|
|||
/** If enabled, diagnostic information will be added to the action output. */
|
||||
this.debug = false;
|
||||
/** Diagnostics to replay */
|
||||
this.replay = null;
|
||||
this.replay = '';
|
||||
}
|
||||
}
|
||||
exports.ActionConfig = ActionConfig;
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ const DebugManager_1 = require("./DebugManager");
|
|||
class ConfigurationProvider {
|
||||
constructor(config) {
|
||||
this.config = config;
|
||||
DebugManager_1.DebugManager.getInstance().setDebugEnabled(config.debug);
|
||||
DebugManager_1.DebugManager.getInstance().initializeConfig(config);
|
||||
}
|
||||
GetCurrentCommitResolver() { return new DefaultCurrentCommitResolver_1.DefaultCurrentCommitResolver(this.config); }
|
||||
GetLastReleaseResolver() { return new DefaultLastReleaseResolver_1.DefaultLastReleaseResolver(this.config); }
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ class DebugManager {
|
|||
if (config.debug) {
|
||||
this.setDebugEnabled(true);
|
||||
}
|
||||
else if (!!config.replay) {
|
||||
else if (config.replay.length > 0) {
|
||||
this.replayFromDiagnostics(config.replay);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ const ConfigurationProvider_1 = require("./ConfigurationProvider");
|
|||
const core = __importStar(require("@actions/core"));
|
||||
const VersionType_1 = require("./providers/VersionType");
|
||||
function setOutput(versionResult) {
|
||||
const { major, minor, patch, increment, versionType, formattedVersion, versionTag, changed, isTagged, authors, currentCommit, previousCommit, previousVersion } = versionResult;
|
||||
const { major, minor, patch, increment, versionType, formattedVersion, versionTag, changed, isTagged, authors, currentCommit, previousCommit, previousVersion, debugOutput } = versionResult;
|
||||
const repository = process.env.GITHUB_REPOSITORY;
|
||||
if (!changed) {
|
||||
core.info('No changes detected for this commit');
|
||||
|
|
@ -60,6 +60,7 @@ function setOutput(versionResult) {
|
|||
core.setOutput("previous_commit", previousCommit);
|
||||
core.setOutput("previous_version", previousVersion);
|
||||
core.setOutput("current_commit", currentCommit);
|
||||
core.setOutput("debug_output", debugOutput);
|
||||
}
|
||||
function run() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import * as core from '@actions/core';
|
|||
import { VersionType } from './providers/VersionType';
|
||||
|
||||
function setOutput(versionResult: VersionResult) {
|
||||
const { major, minor, patch, increment, versionType, formattedVersion, versionTag, changed, isTagged, authors, currentCommit, previousCommit, previousVersion } = versionResult;
|
||||
const { major, minor, patch, increment, versionType, formattedVersion, versionTag, changed, isTagged, authors, currentCommit, previousCommit, previousVersion, debugOutput } = versionResult;
|
||||
|
||||
const repository = process.env.GITHUB_REPOSITORY;
|
||||
|
||||
|
|
@ -32,6 +32,7 @@ function setOutput(versionResult: VersionResult) {
|
|||
core.setOutput("previous_commit", previousCommit);
|
||||
core.setOutput("previous_version", previousVersion);
|
||||
core.setOutput("current_commit", currentCommit);
|
||||
core.setOutput("debug_output", debugOutput);
|
||||
}
|
||||
|
||||
export async function run() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue