mirror of
https://github.com/PaulHatch/semantic-version.git
synced 2026-04-19 21:09:54 +00:00
Add debug/replay mode (MINOR)
This commit is contained in:
parent
4f07cfb9e0
commit
d93d2fb887
20 changed files with 480 additions and 56 deletions
|
|
@ -3,6 +3,7 @@ import { VersionResult } from './VersionResult';
|
|||
import { VersionType } from './providers/VersionType';
|
||||
import { UserInfo } from './providers/UserInfo';
|
||||
import { VersionInformation } from './providers/VersionInformation';
|
||||
import { DebugManager } from './DebugManager';
|
||||
|
||||
export async function runAction(configurationProvider: ConfigurationProvider): Promise<VersionResult> {
|
||||
|
||||
|
|
@ -14,6 +15,8 @@ export async function runAction(configurationProvider: ConfigurationProvider): P
|
|||
const tagFormatter = configurationProvider.GetTagFormatter();
|
||||
const userFormatter = configurationProvider.GetUserFormatter();
|
||||
|
||||
const debugManager = DebugManager.getInstance();
|
||||
|
||||
if (await currentCommitResolver.IsEmptyRepoAsync()) {
|
||||
const versionInfo = new VersionInformation(0, 0, 0, 0, VersionType.None, [], false, false);
|
||||
return new VersionResult(
|
||||
|
|
@ -29,7 +32,8 @@ export async function runAction(configurationProvider: ConfigurationProvider): P
|
|||
userFormatter.Format('author', []),
|
||||
'',
|
||||
'',
|
||||
'0.0.0'
|
||||
'0.0.0',
|
||||
debugManager.getDebugOutput(true)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -71,6 +75,7 @@ export async function runAction(configurationProvider: ConfigurationProvider): P
|
|||
userFormatter.Format('author', authors),
|
||||
currentCommit,
|
||||
lastRelease.hash,
|
||||
`${lastRelease.major}.${lastRelease.minor}.${lastRelease.patch}`
|
||||
`${lastRelease.major}.${lastRelease.minor}.${lastRelease.patch}`,
|
||||
debugManager.getDebugOutput()
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue