renamed GitVersion.js -> GitVersion.ts, added ToolInstaller and ToolLib

This commit is contained in:
Artur Stolear
2019-11-10 10:59:04 +02:00
parent 02c0ebd58a
commit a1dd63474d
10 changed files with 7694 additions and 3023 deletions

24
src/Interfaces.ts Normal file
View File

@@ -0,0 +1,24 @@
export interface IProxy {
find: (toolName: string, versionSpec: string, arch?: string) => string;
debug: (message: string) => void;
exportVariable: (name: string, val: string) => void;
addPath: (inputPath: string) => void;
which: (tool: string, check?: boolean) => Promise<string>;
cacheDir: (sourceDir: string, tool: string, version: string, arch?: string) => Promise<string>;
isExplicitVersion: (versionSpec: string) => boolean;
evaluateVersions: (versions: string[], versionSpec: string) => string;
cleanVersion: (version: string) => string;
createTempDir: () => Promise<string>;
executeDotNet: (args: string[]) => Promise<IExecSyncResult>;
};
export interface IExecSyncResult {
/** standard output */
stdout: string;
/** error output */
stderr: string;
/** return code */
code: number;
/** Error on failure */
error: Error;
}