working on output
This commit is contained in:
@@ -105,6 +105,10 @@ public Stats;
|
||||
return this.getVariable("GITHUB_WORKSPACE");
|
||||
}
|
||||
|
||||
public setOutput(name: string, value: string): void {
|
||||
core.setOutput(name, value);
|
||||
}
|
||||
|
||||
public getInput(input: string, required?: boolean): string {
|
||||
return core.getInput(input, { required } as core.InputOptions);
|
||||
}
|
||||
|
||||
@@ -11,9 +11,15 @@ export async function run() {
|
||||
try {
|
||||
const inputOptions: IGitVersionOptions = getGitVersionOptions();
|
||||
|
||||
await gitVersionTool.run(inputOptions);
|
||||
const result = await gitVersionTool.run(inputOptions);
|
||||
console.log(result.stdout);
|
||||
|
||||
if (result.code === 0) {
|
||||
buildAgent.setSucceeded("GitVersion executed successfully", true);
|
||||
} else {
|
||||
buildAgent.setFailed(result.error.message, true);
|
||||
}
|
||||
|
||||
buildAgent.setSucceeded("GitVersion installed successfully", true);
|
||||
} catch (error) {
|
||||
buildAgent.setFailed(error, true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user