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 {
|
class ConfigurationProvider {
|
||||||
constructor(config) {
|
constructor(config) {
|
||||||
this.config = 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); }
|
GetCurrentCommitResolver() { return new DefaultCurrentCommitResolver_1.DefaultCurrentCommitResolver(this.config); }
|
||||||
GetLastReleaseResolver() { return new DefaultLastReleaseResolver_1.DefaultLastReleaseResolver(this.config); }
|
GetLastReleaseResolver() { return new DefaultLastReleaseResolver_1.DefaultLastReleaseResolver(this.config); }
|
||||||
|
|
@ -153,7 +153,7 @@ class DebugManager {
|
||||||
if (config.debug) {
|
if (config.debug) {
|
||||||
this.setDebugEnabled(true);
|
this.setDebugEnabled(true);
|
||||||
}
|
}
|
||||||
else if (!!config.replay) {
|
else if (config.replay.length > 0) {
|
||||||
this.replayFromDiagnostics(config.replay);
|
this.replayFromDiagnostics(config.replay);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -508,7 +508,7 @@ const ConfigurationProvider_1 = __nccwpck_require__(2614);
|
||||||
const core = __importStar(__nccwpck_require__(2186));
|
const core = __importStar(__nccwpck_require__(2186));
|
||||||
const VersionType_1 = __nccwpck_require__(895);
|
const VersionType_1 = __nccwpck_require__(895);
|
||||||
function setOutput(versionResult) {
|
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;
|
const repository = process.env.GITHUB_REPOSITORY;
|
||||||
if (!changed) {
|
if (!changed) {
|
||||||
core.info('No changes detected for this commit');
|
core.info('No changes detected for this commit');
|
||||||
|
|
@ -530,6 +530,7 @@ function setOutput(versionResult) {
|
||||||
core.setOutput("previous_commit", previousCommit);
|
core.setOutput("previous_commit", previousCommit);
|
||||||
core.setOutput("previous_version", previousVersion);
|
core.setOutput("previous_version", previousVersion);
|
||||||
core.setOutput("current_commit", currentCommit);
|
core.setOutput("current_commit", currentCommit);
|
||||||
|
core.setOutput("debug_output", debugOutput);
|
||||||
}
|
}
|
||||||
function run() {
|
function run() {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
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. */
|
/** If enabled, diagnostic information will be added to the action output. */
|
||||||
this.debug = false;
|
this.debug = false;
|
||||||
/** Diagnostics to replay */
|
/** Diagnostics to replay */
|
||||||
this.replay = null;
|
this.replay = '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
exports.ActionConfig = ActionConfig;
|
exports.ActionConfig = ActionConfig;
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ const DebugManager_1 = require("./DebugManager");
|
||||||
class ConfigurationProvider {
|
class ConfigurationProvider {
|
||||||
constructor(config) {
|
constructor(config) {
|
||||||
this.config = 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); }
|
GetCurrentCommitResolver() { return new DefaultCurrentCommitResolver_1.DefaultCurrentCommitResolver(this.config); }
|
||||||
GetLastReleaseResolver() { return new DefaultLastReleaseResolver_1.DefaultLastReleaseResolver(this.config); }
|
GetLastReleaseResolver() { return new DefaultLastReleaseResolver_1.DefaultLastReleaseResolver(this.config); }
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ class DebugManager {
|
||||||
if (config.debug) {
|
if (config.debug) {
|
||||||
this.setDebugEnabled(true);
|
this.setDebugEnabled(true);
|
||||||
}
|
}
|
||||||
else if (!!config.replay) {
|
else if (config.replay.length > 0) {
|
||||||
this.replayFromDiagnostics(config.replay);
|
this.replayFromDiagnostics(config.replay);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ const ConfigurationProvider_1 = require("./ConfigurationProvider");
|
||||||
const core = __importStar(require("@actions/core"));
|
const core = __importStar(require("@actions/core"));
|
||||||
const VersionType_1 = require("./providers/VersionType");
|
const VersionType_1 = require("./providers/VersionType");
|
||||||
function setOutput(versionResult) {
|
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;
|
const repository = process.env.GITHUB_REPOSITORY;
|
||||||
if (!changed) {
|
if (!changed) {
|
||||||
core.info('No changes detected for this commit');
|
core.info('No changes detected for this commit');
|
||||||
|
|
@ -60,6 +60,7 @@ function setOutput(versionResult) {
|
||||||
core.setOutput("previous_commit", previousCommit);
|
core.setOutput("previous_commit", previousCommit);
|
||||||
core.setOutput("previous_version", previousVersion);
|
core.setOutput("previous_version", previousVersion);
|
||||||
core.setOutput("current_commit", currentCommit);
|
core.setOutput("current_commit", currentCommit);
|
||||||
|
core.setOutput("debug_output", debugOutput);
|
||||||
}
|
}
|
||||||
function run() {
|
function run() {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import * as core from '@actions/core';
|
||||||
import { VersionType } from './providers/VersionType';
|
import { VersionType } from './providers/VersionType';
|
||||||
|
|
||||||
function setOutput(versionResult: VersionResult) {
|
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;
|
const repository = process.env.GITHUB_REPOSITORY;
|
||||||
|
|
||||||
|
|
@ -32,6 +32,7 @@ function setOutput(versionResult: VersionResult) {
|
||||||
core.setOutput("previous_commit", previousCommit);
|
core.setOutput("previous_commit", previousCommit);
|
||||||
core.setOutput("previous_version", previousVersion);
|
core.setOutput("previous_version", previousVersion);
|
||||||
core.setOutput("current_commit", currentCommit);
|
core.setOutput("current_commit", currentCommit);
|
||||||
|
core.setOutput("debug_output", debugOutput);
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function run() {
|
export async function run() {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue