Skip to content

Commit e9431f9

Browse files
committed
improves logging for GitVersion file operations
Adds debug logs for reading and writing GitVersion variables to improve traceability.
1 parent ad377a9 commit e9431f9

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

dist/tools/libs/gitversion.mjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ class GitVersionTool extends DotnetTool {
6464
const workDir = await this.getRepoDir(settings);
6565
await this.checkShallowClone(settings, workDir);
6666
const outputFile = path.join(this.buildAgent.tempDir, `gitversion-${crypto.randomUUID()}.json`);
67+
this.buildAgent.debug(`Writing GitVersion variables to file: ${outputFile}`);
6768
const args = await this.getExecuteArguments(workDir, settings, outputFile);
6869
await this.setDotnetRoot();
6970
const result = await this.executeTool(args);
@@ -231,11 +232,11 @@ class Runner extends RunnerBase {
231232
}
232233
let gitVersionOutput = null;
233234
if (result.outputFile) {
234-
this.buildAgent.debug(`Reading GitVersion output from file: ${result.outputFile}`);
235+
this.buildAgent.debug(`Reading GitVersion variables from file: ${result.outputFile}`);
235236
try {
236237
gitVersionOutput = await this.tool.readGitVersionOutput(result.outputFile);
237238
} catch (error) {
238-
return this.handleOutputError(`Failed to read or parse GitVersion output file: ${this.getErrorMessage(error)}`);
239+
return this.handleOutputError(`Failed to read or parse GitVersion variables file: ${this.getErrorMessage(error)}`);
239240
}
240241
} else {
241242
this.buildAgent.debug("Parsing GitVersion output from stdout");

0 commit comments

Comments
 (0)