moved the gitversion settings to a file

This commit is contained in:
Artur Stolear
2020-02-08 19:02:57 +02:00
parent b98ee9d8b2
commit dab6b01596
20 changed files with 442 additions and 259 deletions

View File

@@ -8,6 +8,7 @@ import { TYPES, IExecResult, IBuildAgent } from "./common";
import { IVersionManager } from "./versionManager";
export interface IDotnetTool {
disableTelemetry(): void;
toolInstall(toolName: string, versionSpec: string, checkLatest: boolean, includePre: boolean): Promise<string>;
}
@@ -27,6 +28,10 @@ export class DotnetTool implements IDotnetTool {
this.httpClient = new http.HttpClient("dotnet");
}
public disableTelemetry(): void {
this.buildAgent.exportVariable("DOTNET_CLI_TELEMETRY_OPTOUT", "1");
}
public execute(cmd: string, args: string[]): Promise<IExecResult> {
console.log(`Command: ${cmd} ${args.join(' ')}`);
return this.buildAgent.exec(cmd, args);