From 4f9e9ebfb6a77e11dc376c947a0ed07614172818 Mon Sep 17 00:00:00 2001 From: Artur Stolear Date: Mon, 9 Dec 2024 22:50:49 +0000 Subject: [PATCH] dist update --- dist/tools/libs/gitversion.mjs.map | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/dist/tools/libs/gitversion.mjs.map b/dist/tools/libs/gitversion.mjs.map index cb306a8d0..92e4cdc2e 100644 --- a/dist/tools/libs/gitversion.mjs.map +++ b/dist/tools/libs/gitversion.mjs.map @@ -1,5 +1 @@ -<<<<<<< HEAD -{"version":3,"file":"gitversion.mjs","sources":["../../../src/tools/gitversion/settings.ts","../../../src/tools/gitversion/tool.ts","../../../src/tools/gitversion/runner.ts"],"sourcesContent":["import { type ISettingsProvider, SettingsProvider } from '@tools/common'\nimport { type CommandSettings, type ExecuteSettings } from './models'\n\nexport interface IGitVersionSettingsProvider extends ISettingsProvider {\n getExecuteSettings(): ExecuteSettings\n\n getCommandSettings(): CommandSettings\n}\n\nexport class GitVersionSettingsProvider extends SettingsProvider implements IGitVersionSettingsProvider {\n getExecuteSettings(): ExecuteSettings {\n const targetPath = this.buildAgent.getInput('targetPath')\n\n const disableCache = this.buildAgent.getBooleanInput('disableCache')\n const disableNormalization = this.buildAgent.getBooleanInput('disableNormalization')\n const disableShallowCloneCheck = this.buildAgent.getBooleanInput('disableShallowCloneCheck')\n\n const useConfigFile = this.buildAgent.getBooleanInput('useConfigFile')\n const configFilePath = this.buildAgent.getInput('configFilePath')\n const overrideConfig = this.buildAgent.getListInput('overrideConfig')\n\n const updateAssemblyInfo = this.buildAgent.getBooleanInput('updateAssemblyInfo')\n const updateAssemblyInfoFilename = this.buildAgent.getInput('updateAssemblyInfoFilename')\n\n return {\n targetPath,\n disableCache,\n disableNormalization,\n disableShallowCloneCheck,\n useConfigFile,\n configFilePath,\n overrideConfig,\n updateAssemblyInfo,\n updateAssemblyInfoFilename\n }\n }\n\n getCommandSettings(): CommandSettings {\n const targetPath = this.buildAgent.getInput('targetPath')\n const disableShallowCloneCheck = this.buildAgent.getBooleanInput('disableShallowCloneCheck')\n const args = this.buildAgent.getInput('arguments')\n\n return {\n targetPath,\n disableShallowCloneCheck,\n arguments: args\n }\n }\n}\n","import { type ExecResult } from '@agents/common'\nimport { DotnetTool, keysOf } from '@tools/common'\nimport { type CommandSettings, type ExecuteSettings, type GitVersionOutput } from './models'\nimport { GitVersionSettingsProvider, type IGitVersionSettingsProvider } from './settings'\n\nexport class GitVersionTool extends DotnetTool {\n get packageName(): string {\n return 'GitVersion.Tool'\n }\n\n get toolName(): string {\n return 'dotnet-gitversion'\n }\n\n get toolPathVariable(): string {\n return 'GITVERSION_PATH'\n }\n\n get versionRange(): string | null {\n return '>=5.2.0 <6.1.0'\n }\n\n get settingsProvider(): IGitVersionSettingsProvider {\n return new GitVersionSettingsProvider(this.buildAgent)\n }\n\n async executeJson(): Promise {\n const settings = this.settingsProvider.getExecuteSettings()\n const workDir = await this.getRepoDir(settings)\n\n await this.checkShallowClone(settings, workDir)\n\n const args = await this.getExecuteArguments(workDir, settings)\n\n await this.setDotnetRoot()\n return await this.executeTool(args)\n }\n\n async executeCommand(): Promise {\n const settings = this.settingsProvider.getCommandSettings()\n const workDir = await this.getRepoDir(settings)\n\n await this.checkShallowClone(settings, workDir)\n\n const args = this.getCommandArguments(workDir, settings)\n\n await this.setDotnetRoot()\n return await this.executeTool(args)\n }\n\n writeGitVersionToAgent(output: GitVersionOutput): void {\n for (const property of keysOf(output)) {\n const name = this.toCamelCase(property)\n try {\n let value = output[property]?.toString()\n if (value === '0') {\n value = '0'\n }\n this.buildAgent.setOutput(name, value)\n this.buildAgent.setOutput(`GitVersion_${property}`, value)\n this.buildAgent.setVariable(name, value)\n this.buildAgent.setVariable(`GitVersion_${property}`, value)\n } catch (_error) {\n this.buildAgent.error(`Unable to set output/variable for ${property}`)\n }\n }\n }\n\n protected async getRepoDir(settings: ExecuteSettings | CommandSettings): Promise {\n return await super.getRepoPath(settings.targetPath)\n }\n\n protected async getExecuteArguments(workDir: string, options: ExecuteSettings): Promise {\n const args = [workDir, '/output', 'json', '/output', 'buildserver']\n\n const {\n useConfigFile,\n disableCache,\n disableNormalization,\n configFilePath,\n overrideConfig,\n updateAssemblyInfo,\n updateAssemblyInfoFilename\n //\n } = options\n\n if (disableCache) {\n args.push('/nocache')\n }\n\n if (disableNormalization) {\n args.push('/nonormalize')\n }\n\n if (useConfigFile) {\n if (await this.isValidInputFile('configFilePath', configFilePath)) {\n args.push('/config', configFilePath)\n } else {\n throw new Error(`GitVersion configuration file not found at ${configFilePath}`)\n }\n }\n\n if (overrideConfig) {\n for (let config of overrideConfig) {\n config = config.trim()\n if (config.match(/([a-zA-Z0-9]+(-[a-zA-Z]+)*=[a-zA-Z0-9\\- :.']*)/)) {\n args.push('/overrideconfig', config)\n }\n }\n }\n\n if (updateAssemblyInfo) {\n args.push('/updateassemblyinfo')\n\n // You can specify 'updateAssemblyInfo' without 'updateAssemblyInfoFilename'.\n if (updateAssemblyInfoFilename?.length > 0) {\n if (await this.isValidInputFile('updateAssemblyInfoFilename', updateAssemblyInfoFilename)) {\n args.push(updateAssemblyInfoFilename)\n } else {\n throw new Error(`AssemblyInfoFilename file not found at ${updateAssemblyInfoFilename}`)\n }\n }\n }\n\n return args\n }\n\n protected getCommandArguments(workDir: string, options: CommandSettings): string[] {\n let args = [workDir]\n\n if (options.arguments) {\n args = args.concat(this.argStringToArray(options.arguments))\n }\n return args\n }\n\n private argStringToArray(argString: string): string[] {\n const args: string[] = []\n\n let inQuotes = false\n let escaped = false\n let lastCharWasSpace = true\n let arg = ''\n\n const append = (c: string): void => {\n // we only escape double quotes.\n if (escaped && c !== '\"') {\n arg += '\\\\'\n }\n\n arg += c\n escaped = false\n }\n\n for (let i = 0; i < argString.length; i++) {\n const c = argString.charAt(i)\n\n if (c === ' ' && !inQuotes) {\n if (!lastCharWasSpace) {\n args.push(arg)\n arg = ''\n }\n lastCharWasSpace = true\n continue\n } else {\n lastCharWasSpace = false\n }\n\n if (c === '\"') {\n if (!escaped) {\n inQuotes = !inQuotes\n } else {\n append(c)\n }\n continue\n }\n\n if (c === '\\\\' && escaped) {\n append(c)\n continue\n }\n\n if (c === '\\\\' && inQuotes) {\n escaped = true\n continue\n }\n\n append(c)\n lastCharWasSpace = false\n }\n\n if (!lastCharWasSpace) {\n args.push(arg.trim())\n }\n\n return args\n }\n\n private async checkShallowClone(settings: ExecuteSettings | CommandSettings, workDir: string): Promise {\n if (!settings.disableShallowCloneCheck) {\n const isShallowResult = await this.execute('git', ['-C', workDir, 'rev-parse', '--is-shallow-repository'])\n if (isShallowResult.code === 0 && isShallowResult.stdout?.trim() === 'true') {\n throw new Error(\n 'The repository is shallow. Consider disabling shallow clones. See https://github.com/GitTools/actions/blob/main/docs/cloning.md for more information.'\n )\n }\n }\n }\n\n private toCamelCase(input: string): string {\n return input.replace(/^\\w|[A-Z]|\\b\\w|\\s+/g, function (match, index) {\n if (+match === 0) return '' // or if (/\\s+/.test(match)) for white spaces\n return index === 0 ? match.toLowerCase() : match.toUpperCase()\n })\n }\n}\n","import { type ExecResult, type IBuildAgent } from '@agents/common'\nimport { type IRunner } from '@tools/common'\nimport { type Commands, type GitVersionOutput } from './models'\nimport { GitVersionTool } from './tool'\n\nexport class Runner implements IRunner {\n private readonly gitVersionTool: GitVersionTool\n\n constructor(private readonly buildAgent: IBuildAgent) {\n this.gitVersionTool = new GitVersionTool(this.buildAgent)\n }\n\n async run(command: Commands): Promise {\n switch (command) {\n case 'setup':\n return await this.setup()\n case 'execute':\n return await this.execute()\n case 'command':\n return await this.command()\n }\n }\n\n private async setup(): Promise {\n try {\n this.disableTelemetry()\n\n this.buildAgent.debug('Installing GitVersion')\n const toolPath = await this.gitVersionTool.install()\n\n const pathVariable = this.gitVersionTool.toolPathVariable\n this.buildAgent.info(`Set ${pathVariable} to ${toolPath}`)\n this.buildAgent.setVariable(pathVariable, toolPath)\n\n this.buildAgent.setSucceeded('GitVersion installed successfully', true)\n return {\n code: 0\n }\n } catch (error) {\n if (error instanceof Error) {\n this.buildAgent.setFailed(error.message, true)\n }\n return {\n code: -1,\n error: error as Error\n }\n }\n }\n\n private async execute(): Promise {\n try {\n this.disableTelemetry()\n\n this.buildAgent.info('Executing GitVersion')\n\n const result = await this.gitVersionTool.executeJson()\n\n if (result.code === 0) {\n this.buildAgent.info('GitVersion executed successfully')\n const stdout: string = result.stdout as string\n\n this.buildAgent.info('GitVersion output:')\n this.buildAgent.info('-------------------')\n this.buildAgent.info(stdout)\n this.buildAgent.info('-------------------')\n this.buildAgent.debug('Parsing GitVersion output')\n\n if (stdout.lastIndexOf('{') === -1 || stdout.lastIndexOf('}') === -1) {\n this.buildAgent.debug('GitVersion output is not valid JSON')\n this.buildAgent.setFailed('GitVersion output is not valid JSON', true)\n return {\n code: -1,\n error: new Error('GitVersion output is not valid JSON')\n }\n } else {\n const jsonOutput = stdout.substring(stdout.lastIndexOf('{'), stdout.lastIndexOf('}') + 1)\n\n const gitVersionOutput = JSON.parse(jsonOutput) as GitVersionOutput\n this.gitVersionTool.writeGitVersionToAgent(gitVersionOutput)\n this.buildAgent.setSucceeded('GitVersion executed successfully', true)\n return result\n }\n } else {\n this.buildAgent.debug('GitVersion failed')\n const error = result.error\n if (error instanceof Error) {\n this.buildAgent.setFailed(error.message, true)\n }\n return result\n }\n } catch (error) {\n if (error instanceof Error) {\n this.buildAgent.setFailed(error.message, true)\n }\n return {\n code: -1,\n error: error as Error\n }\n }\n }\n\n private async command(): Promise {\n try {\n this.disableTelemetry()\n\n this.buildAgent.info('Executing GitVersion')\n\n const result = await this.gitVersionTool.executeCommand()\n\n if (result.code === 0) {\n this.buildAgent.info('GitVersion executed successfully')\n const stdout = result.stdout as string\n\n this.buildAgent.info('GitVersion output:')\n this.buildAgent.info('-------------------')\n this.buildAgent.info(stdout)\n this.buildAgent.info('-------------------')\n\n this.buildAgent.setSucceeded('GitVersion executed successfully', true)\n return result\n } else {\n this.buildAgent.debug('GitVersion failed')\n const error = result.error\n if (error instanceof Error) {\n this.buildAgent.setFailed(error.message, true)\n }\n return result\n }\n } catch (error) {\n if (error instanceof Error) {\n this.buildAgent.setFailed(error.message, true)\n }\n return {\n code: -1,\n error: error as Error\n }\n }\n }\n\n private disableTelemetry(): void {\n this.buildAgent.info(`Running on: '${this.buildAgent.agentName}'`)\n this.buildAgent.debug('Disabling telemetry')\n this.gitVersionTool.disableTelemetry()\n }\n}\n"],"names":[],"mappings":";;;;;;;AASO,MAAM,mCAAmC,gBAAwD,CAAA;AAAA,EACpG,kBAAsC,GAAA;AAClC,IAAA,MAAM,UAAa,GAAA,IAAA,CAAK,UAAW,CAAA,QAAA,CAA0B,YAAY,CAAA;AAEzE,IAAA,MAAM,YAAe,GAAA,IAAA,CAAK,UAAW,CAAA,eAAA,CAAiC,cAAc,CAAA;AACpF,IAAA,MAAM,oBAAuB,GAAA,IAAA,CAAK,UAAW,CAAA,eAAA,CAAiC,sBAAsB,CAAA;AACpG,IAAA,MAAM,wBAA2B,GAAA,IAAA,CAAK,UAAW,CAAA,eAAA,CAAiC,0BAA0B,CAAA;AAE5G,IAAA,MAAM,aAAgB,GAAA,IAAA,CAAK,UAAW,CAAA,eAAA,CAAiC,eAAe,CAAA;AACtF,IAAA,MAAM,cAAiB,GAAA,IAAA,CAAK,UAAW,CAAA,QAAA,CAA0B,gBAAgB,CAAA;AACjF,IAAA,MAAM,cAAiB,GAAA,IAAA,CAAK,UAAW,CAAA,YAAA,CAA8B,gBAAgB,CAAA;AAErF,IAAA,MAAM,kBAAqB,GAAA,IAAA,CAAK,UAAW,CAAA,eAAA,CAAiC,oBAAoB,CAAA;AAChG,IAAA,MAAM,0BAA6B,GAAA,IAAA,CAAK,UAAW,CAAA,QAAA,CAA0B,4BAA4B,CAAA;AAEzG,IAAO,OAAA;AAAA,MACH,UAAA;AAAA,MACA,YAAA;AAAA,MACA,oBAAA;AAAA,MACA,wBAAA;AAAA,MACA,aAAA;AAAA,MACA,cAAA;AAAA,MACA,cAAA;A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AAK,eAAe,gBAAiB,EAAA;AAAA;AAE7C;;;;"} -======= -{"version":3,"file":"gitversion.mjs","sources":["../../../src/tools/gitversion/settings.ts","../../../src/tools/gitversion/tool.ts","../../../src/tools/gitversion/runner.ts"],"sourcesContent":["import { type ISettingsProvider, SettingsProvider } from '@tools/common'\nimport { type CommandSettings, type ExecuteSettings } from './models'\n\nexport interface IGitVersionSettingsProvider extends ISettingsProvider {\n getExecuteSettings(): ExecuteSettings\n\n getCommandSettings(): CommandSettings\n}\n\nexport class GitVersionSettingsProvider extends SettingsProvider implements IGitVersionSettingsProvider {\n getExecuteSettings(): ExecuteSettings {\n const targetPath = this.buildAgent.getInput('targetPath')\n\n const disableCache = this.buildAgent.getBooleanInput('disableCache')\n const disableNormalization = this.buildAgent.getBooleanInput('disableNormalization')\n const disableShallowCloneCheck = this.buildAgent.getBooleanInput('disableShallowCloneCheck')\n\n const useConfigFile = this.buildAgent.getBooleanInput('useConfigFile')\n const configFilePath = this.buildAgent.getInput('configFilePath')\n const overrideConfig = this.buildAgent.getListInput('overrideConfig')\n\n const updateAssemblyInfo = this.buildAgent.getBooleanInput('updateAssemblyInfo')\n const updateAssemblyInfoFilename = this.buildAgent.getInput('updateAssemblyInfoFilename')\n\n return {\n targetPath,\n disableCache,\n disableNormalization,\n disableShallowCloneCheck,\n useConfigFile,\n configFilePath,\n overrideConfig,\n updateAssemblyInfo,\n updateAssemblyInfoFilename\n }\n }\n\n getCommandSettings(): CommandSettings {\n const targetPath = this.buildAgent.getInput('targetPath')\n const disableShallowCloneCheck = this.buildAgent.getBooleanInput('disableShallowCloneCheck')\n const args = this.buildAgent.getInput('arguments')\n\n return {\n targetPath,\n disableShallowCloneCheck,\n arguments: args\n }\n }\n}\n","import { type ExecResult } from '@agents/common'\nimport { DotnetTool, keysOf } from '@tools/common'\nimport { type CommandSettings, type ExecuteSettings, type GitVersionOutput } from './models'\nimport { GitVersionSettingsProvider, type IGitVersionSettingsProvider } from './settings'\n\nexport class GitVersionTool extends DotnetTool {\n get packageName(): string {\n return 'GitVersion.Tool'\n }\n\n get toolName(): string {\n return 'dotnet-gitversion'\n }\n\n get toolPathVariable(): string {\n return 'GITVERSION_PATH'\n }\n\n get versionRange(): string | null {\n return '>=5.2.0 <6.1.0'\n }\n\n get settingsProvider(): IGitVersionSettingsProvider {\n return new GitVersionSettingsProvider(this.buildAgent)\n }\n\n async executeJson(): Promise {\n const settings = this.settingsProvider.getExecuteSettings()\n const workDir = await this.getRepoDir(settings)\n\n await this.checkShallowClone(settings, workDir)\n\n const args = await this.getExecuteArguments(workDir, settings)\n\n await this.setDotnetRoot()\n return await this.executeTool(args)\n }\n\n async executeCommand(): Promise {\n const settings = this.settingsProvider.getCommandSettings()\n const workDir = await this.getRepoDir(settings)\n\n await this.checkShallowClone(settings, workDir)\n\n const args = this.getCommandArguments(workDir, settings)\n\n await this.setDotnetRoot()\n return await this.executeTool(args)\n }\n\n writeGitVersionToAgent(output: GitVersionOutput): void {\n for (const property of keysOf(output)) {\n const name = this.toCamelCase(property)\n try {\n let value = output[property]?.toString()\n if (value === '0') {\n value = '0'\n }\n this.buildAgent.setOutput(name, value)\n this.buildAgent.setOutput(`GitVersion_${property}`, value)\n this.buildAgent.setVariable(name, value)\n this.buildAgent.setVariable(`GitVersion_${property}`, value)\n } catch (_error) {\n this.buildAgent.error(`Unable to set output/variable for ${property}`)\n }\n }\n }\n\n protected async getRepoDir(settings: ExecuteSettings | CommandSettings): Promise {\n return await super.getRepoPath(settings.targetPath)\n }\n\n protected async getExecuteArguments(workDir: string, options: ExecuteSettings): Promise {\n const args = [workDir, '/output', 'json']\n\n const {\n useConfigFile,\n disableCache,\n disableNormalization,\n configFilePath,\n overrideConfig,\n updateAssemblyInfo,\n updateAssemblyInfoFilename\n //\n } = options\n\n if (disableCache) {\n args.push('/nocache')\n }\n\n if (disableNormalization) {\n args.push('/nonormalize')\n }\n\n if (useConfigFile) {\n if (await this.isValidInputFile('configFilePath', configFilePath)) {\n args.push('/config', configFilePath)\n } else {\n throw new Error(`GitVersion configuration file not found at ${configFilePath}`)\n }\n }\n\n if (overrideConfig) {\n for (let config of overrideConfig) {\n config = config.trim()\n if (config.match(/([a-zA-Z0-9]+(-[a-zA-Z]+)*=[a-zA-Z0-9\\- :.']*)/)) {\n args.push('/overrideconfig', config)\n }\n }\n }\n\n if (updateAssemblyInfo) {\n args.push('/updateassemblyinfo')\n\n // You can specify 'updateAssemblyInfo' without 'updateAssemblyInfoFilename'.\n if (updateAssemblyInfoFilename?.length > 0) {\n if (await this.isValidInputFile('updateAssemblyInfoFilename', updateAssemblyInfoFilename)) {\n args.push(updateAssemblyInfoFilename)\n } else {\n throw new Error(`AssemblyInfoFilename file not found at ${updateAssemblyInfoFilename}`)\n }\n }\n }\n\n return args\n }\n\n protected getCommandArguments(workDir: string, options: CommandSettings): string[] {\n let args = [workDir]\n\n if (options.arguments) {\n args = args.concat(this.argStringToArray(options.arguments))\n }\n return args\n }\n\n private argStringToArray(argString: string): string[] {\n const args: string[] = []\n\n let inQuotes = false\n let escaped = false\n let lastCharWasSpace = true\n let arg = ''\n\n const append = (c: string): void => {\n // we only escape double quotes.\n if (escaped && c !== '\"') {\n arg += '\\\\'\n }\n\n arg += c\n escaped = false\n }\n\n for (let i = 0; i < argString.length; i++) {\n const c = argString.charAt(i)\n\n if (c === ' ' && !inQuotes) {\n if (!lastCharWasSpace) {\n args.push(arg)\n arg = ''\n }\n lastCharWasSpace = true\n continue\n } else {\n lastCharWasSpace = false\n }\n\n if (c === '\"') {\n if (!escaped) {\n inQuotes = !inQuotes\n } else {\n append(c)\n }\n continue\n }\n\n if (c === '\\\\' && escaped) {\n append(c)\n continue\n }\n\n if (c === '\\\\' && inQuotes) {\n escaped = true\n continue\n }\n\n append(c)\n lastCharWasSpace = false\n }\n\n if (!lastCharWasSpace) {\n args.push(arg.trim())\n }\n\n return args\n }\n\n private async checkShallowClone(settings: ExecuteSettings | CommandSettings, workDir: string): Promise {\n if (!settings.disableShallowCloneCheck) {\n const isShallowResult = await this.execute('git', ['-C', workDir, 'rev-parse', '--is-shallow-repository'])\n if (isShallowResult.code === 0 && isShallowResult.stdout?.trim() === 'true') {\n throw new Error(\n 'The repository is shallow. Consider disabling shallow clones. See https://github.com/GitTools/actions/blob/main/docs/cloning.md for more information.'\n )\n }\n }\n }\n\n private toCamelCase(input: string): string {\n return input.replace(/^\\w|[A-Z]|\\b\\w|\\s+/g, function (match, index) {\n if (+match === 0) return '' // or if (/\\s+/.test(match)) for white spaces\n return index === 0 ? match.toLowerCase() : match.toUpperCase()\n })\n }\n}\n","import { type ExecResult, type IBuildAgent } from '@agents/common'\nimport { type IRunner } from '@tools/common'\nimport { type Commands, type GitVersionOutput } from './models'\nimport { GitVersionTool } from './tool'\n\nexport class Runner implements IRunner {\n private readonly gitVersionTool: GitVersionTool\n\n constructor(private readonly buildAgent: IBuildAgent) {\n this.gitVersionTool = new GitVersionTool(this.buildAgent)\n }\n\n async run(command: Commands): Promise {\n switch (command) {\n case 'setup':\n return await this.setup()\n case 'execute':\n return await this.execute()\n case 'command':\n return await this.command()\n }\n }\n\n private async setup(): Promise {\n try {\n this.disableTelemetry()\n\n this.buildAgent.debug('Installing GitVersion')\n const toolPath = await this.gitVersionTool.install()\n\n const pathVariable = this.gitVersionTool.toolPathVariable\n this.buildAgent.info(`Set ${pathVariable} to ${toolPath}`)\n this.buildAgent.setVariable(pathVariable, toolPath)\n\n this.buildAgent.setSucceeded('GitVersion installed successfully', true)\n return {\n code: 0\n }\n } catch (error) {\n if (error instanceof Error) {\n this.buildAgent.setFailed(error.message, true)\n }\n return {\n code: -1,\n error: error as Error\n }\n }\n }\n\n private async execute(): Promise {\n try {\n this.disableTelemetry()\n\n this.buildAgent.info('Executing GitVersion')\n\n const result = await this.gitVersionTool.executeJson()\n\n if (result.code === 0) {\n this.buildAgent.info('GitVersion executed successfully')\n const stdout: string = result.stdout as string\n\n this.buildAgent.info('GitVersion output:')\n this.buildAgent.info('-------------------')\n this.buildAgent.info(stdout)\n this.buildAgent.info('-------------------')\n this.buildAgent.debug('Parsing GitVersion output')\n\n if (stdout.lastIndexOf('{') === -1 || stdout.lastIndexOf('}') === -1) {\n this.buildAgent.debug('GitVersion output is not valid JSON')\n this.buildAgent.setFailed('GitVersion output is not valid JSON', true)\n return {\n code: -1,\n error: new Error('GitVersion output is not valid JSON')\n }\n } else {\n const jsonOutput = stdout.substring(stdout.lastIndexOf('{'), stdout.lastIndexOf('}') + 1)\n\n const gitVersionOutput = JSON.parse(jsonOutput) as GitVersionOutput\n this.gitVersionTool.writeGitVersionToAgent(gitVersionOutput)\n this.buildAgent.setSucceeded('GitVersion executed successfully', true)\n return result\n }\n } else {\n this.buildAgent.debug('GitVersion failed')\n const error = result.error\n if (error instanceof Error) {\n this.buildAgent.setFailed(error.message, true)\n }\n return result\n }\n } catch (error) {\n if (error instanceof Error) {\n this.buildAgent.setFailed(error.message, true)\n }\n return {\n code: -1,\n error: error as Error\n }\n }\n }\n\n private async command(): Promise {\n try {\n this.disableTelemetry()\n\n this.buildAgent.info('Executing GitVersion')\n\n const result = await this.gitVersionTool.executeCommand()\n\n if (result.code === 0) {\n this.buildAgent.info('GitVersion executed successfully')\n const stdout = result.stdout as string\n\n this.buildAgent.info('GitVersion output:')\n this.buildAgent.info('-------------------')\n this.buildAgent.info(stdout)\n this.buildAgent.info('-------------------')\n\n this.buildAgent.setSucceeded('GitVersion executed successfully', true)\n return result\n } else {\n this.buildAgent.debug('GitVersion failed')\n const error = result.error\n if (error instanceof Error) {\n this.buildAgent.setFailed(error.message, true)\n }\n return result\n }\n } catch (error) {\n if (error instanceof Error) {\n this.buildAgent.setFailed(error.message, true)\n }\n return {\n code: -1,\n error: error as Error\n }\n }\n }\n\n private disableTelemetry(): void {\n this.buildAgent.info(`Running on: '${this.buildAgent.agentName}'`)\n this.buildAgent.debug('Disabling telemetry')\n this.gitVersionTool.disableTelemetry()\n }\n}\n"],"names":[],"mappings":";;;;;;;AASO,MAAM,mCAAmC,gBAAwD,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AK,IAAA,CAAA,UAAA,CAAW,YAAa,CAAA,kCAAA,EAAoC,IAAI,CAAA,CAAA;AACrE,QAAO,OAAA,MAAA,CAAA;AAAA,OACJ,MAAA;AACH,QAAK,IAAA,CAAA,UAAA,CAAW,MAAM,mBAAmB,CAAA,CAAA;AACzC,QAAA,MAAM,QAAQ,MAAO,CAAA,KAAA,CAAA;AACrB,QAAA,IAAI,iBAAiB,KAAO,EAAA;AACxB,UAAA,IAAA,CAAK,UAAW,CAAA,SAAA,CAAU,KAAM,CAAA,OAAA,EAAS,IAAI,CAAA,CAAA;AAAA,SACjD;AACA,QAAO,OAAA,MAAA,CAAA;AAAA,OACX;AAAA,aACK,KAAO,EAAA;AACZ,MAAA,IAAI,iBAAiB,KAAO,EAAA;AACxB,QAAA,IAAA,CAAK,UAAW,CAAA,SAAA,CAAU,KAAM,CAAA,OAAA,EAAS,IAAI,CAAA,CAAA;AAAA,OACjD;AACA,MAAO,OAAA;AAAA,QACH,IAAM,EAAA,CAAA,CAAA;AAAA,QACN,KAAA;AAAA,OACJ,CAAA;AAAA,KACJ;AAAA,GACJ;AAAA,EAEQ,gBAAyB,GAAA;AAC7B,IAAA,IAAA,CAAK,WAAW,IAAK,CAAA,CAAA,aAAA,EAAgB,IAAK,CAAA,UAAA,CAAW,SAAS,CAAG,CAAA,CAAA,CAAA,CAAA;AACjE,IAAK,IAAA,CAAA,UAAA,CAAW,MAAM,qBAAqB,CAAA,CAAA;AAC3C,IAAA,IAAA,CAAK,eAAe,gBAAiB,EAAA,CAAA;AAAA,GACzC;AACJ;;;;"} ->>>>>>> 07cfbbc6 (Remove buildserver output argument from GitVersion tool as it's duplicating the actions behavior) +{"version":3,"file":"gitversion.mjs","sources":["../../../src/tools/gitversion/settings.ts","../../../src/tools/gitversion/tool.ts","../../../src/tools/gitversion/runner.ts"],"sourcesContent":["import { type ISettingsProvider, SettingsProvider } from '@tools/common'\nimport { type CommandSettings, type ExecuteSettings } from './models'\n\nexport interface IGitVersionSettingsProvider extends ISettingsProvider {\n getExecuteSettings(): ExecuteSettings\n\n getCommandSettings(): CommandSettings\n}\n\nexport class GitVersionSettingsProvider extends SettingsProvider implements IGitVersionSettingsProvider {\n getExecuteSettings(): ExecuteSettings {\n const targetPath = this.buildAgent.getInput('targetPath')\n\n const disableCache = this.buildAgent.getBooleanInput('disableCache')\n const disableNormalization = this.buildAgent.getBooleanInput('disableNormalization')\n const disableShallowCloneCheck = this.buildAgent.getBooleanInput('disableShallowCloneCheck')\n\n const useConfigFile = this.buildAgent.getBooleanInput('useConfigFile')\n const configFilePath = this.buildAgent.getInput('configFilePath')\n const overrideConfig = this.buildAgent.getListInput('overrideConfig')\n\n const updateAssemblyInfo = this.buildAgent.getBooleanInput('updateAssemblyInfo')\n const updateAssemblyInfoFilename = this.buildAgent.getInput('updateAssemblyInfoFilename')\n\n return {\n targetPath,\n disableCache,\n disableNormalization,\n disableShallowCloneCheck,\n useConfigFile,\n configFilePath,\n overrideConfig,\n updateAssemblyInfo,\n updateAssemblyInfoFilename\n }\n }\n\n getCommandSettings(): CommandSettings {\n const targetPath = this.buildAgent.getInput('targetPath')\n const disableShallowCloneCheck = this.buildAgent.getBooleanInput('disableShallowCloneCheck')\n const args = this.buildAgent.getInput('arguments')\n\n return {\n targetPath,\n disableShallowCloneCheck,\n arguments: args\n }\n }\n}\n","import { type ExecResult } from '@agents/common'\nimport { DotnetTool, keysOf } from '@tools/common'\nimport { type CommandSettings, type ExecuteSettings, type GitVersionOutput } from './models'\nimport { GitVersionSettingsProvider, type IGitVersionSettingsProvider } from './settings'\n\nexport class GitVersionTool extends DotnetTool {\n get packageName(): string {\n return 'GitVersion.Tool'\n }\n\n get toolName(): string {\n return 'dotnet-gitversion'\n }\n\n get toolPathVariable(): string {\n return 'GITVERSION_PATH'\n }\n\n get versionRange(): string | null {\n return '>=5.2.0 <6.1.0'\n }\n\n get settingsProvider(): IGitVersionSettingsProvider {\n return new GitVersionSettingsProvider(this.buildAgent)\n }\n\n async executeJson(): Promise {\n const settings = this.settingsProvider.getExecuteSettings()\n const workDir = await this.getRepoDir(settings)\n\n await this.checkShallowClone(settings, workDir)\n\n const args = await this.getExecuteArguments(workDir, settings)\n\n await this.setDotnetRoot()\n return await this.executeTool(args)\n }\n\n async executeCommand(): Promise {\n const settings = this.settingsProvider.getCommandSettings()\n const workDir = await this.getRepoDir(settings)\n\n await this.checkShallowClone(settings, workDir)\n\n const args = this.getCommandArguments(workDir, settings)\n\n await this.setDotnetRoot()\n return await this.executeTool(args)\n }\n\n writeGitVersionToAgent(output: GitVersionOutput): void {\n for (const property of keysOf(output)) {\n const name = this.toCamelCase(property)\n try {\n let value = output[property]?.toString()\n if (value === '0') {\n value = '0'\n }\n this.buildAgent.setOutput(name, value)\n this.buildAgent.setOutput(`GitVersion_${property}`, value)\n this.buildAgent.setVariable(name, value)\n this.buildAgent.setVariable(`GitVersion_${property}`, value)\n } catch (_error) {\n this.buildAgent.error(`Unable to set output/variable for ${property}`)\n }\n }\n }\n\n protected async getRepoDir(settings: ExecuteSettings | CommandSettings): Promise {\n return await super.getRepoPath(settings.targetPath)\n }\n\n protected async getExecuteArguments(workDir: string, options: ExecuteSettings): Promise {\n const args = [workDir, '/output', 'json']\n\n const {\n useConfigFile,\n disableCache,\n disableNormalization,\n configFilePath,\n overrideConfig,\n updateAssemblyInfo,\n updateAssemblyInfoFilename\n //\n } = options\n\n if (disableCache) {\n args.push('/nocache')\n }\n\n if (disableNormalization) {\n args.push('/nonormalize')\n }\n\n if (useConfigFile) {\n if (await this.isValidInputFile('configFilePath', configFilePath)) {\n args.push('/config', configFilePath)\n } else {\n throw new Error(`GitVersion configuration file not found at ${configFilePath}`)\n }\n }\n\n if (overrideConfig) {\n for (let config of overrideConfig) {\n config = config.trim()\n if (config.match(/([a-zA-Z0-9]+(-[a-zA-Z]+)*=[a-zA-Z0-9\\- :.']*)/)) {\n args.push('/overrideconfig', config)\n }\n }\n }\n\n if (updateAssemblyInfo) {\n args.push('/updateassemblyinfo')\n\n // You can specify 'updateAssemblyInfo' without 'updateAssemblyInfoFilename'.\n if (updateAssemblyInfoFilename?.length > 0) {\n if (await this.isValidInputFile('updateAssemblyInfoFilename', updateAssemblyInfoFilename)) {\n args.push(updateAssemblyInfoFilename)\n } else {\n throw new Error(`AssemblyInfoFilename file not found at ${updateAssemblyInfoFilename}`)\n }\n }\n }\n\n return args\n }\n\n protected getCommandArguments(workDir: string, options: CommandSettings): string[] {\n let args = [workDir]\n\n if (options.arguments) {\n args = args.concat(this.argStringToArray(options.arguments))\n }\n return args\n }\n\n private argStringToArray(argString: string): string[] {\n const args: string[] = []\n\n let inQuotes = false\n let escaped = false\n let lastCharWasSpace = true\n let arg = ''\n\n const append = (c: string): void => {\n // we only escape double quotes.\n if (escaped && c !== '\"') {\n arg += '\\\\'\n }\n\n arg += c\n escaped = false\n }\n\n for (let i = 0; i < argString.length; i++) {\n const c = argString.charAt(i)\n\n if (c === ' ' && !inQuotes) {\n if (!lastCharWasSpace) {\n args.push(arg)\n arg = ''\n }\n lastCharWasSpace = true\n continue\n } else {\n lastCharWasSpace = false\n }\n\n if (c === '\"') {\n if (!escaped) {\n inQuotes = !inQuotes\n } else {\n append(c)\n }\n continue\n }\n\n if (c === '\\\\' && escaped) {\n append(c)\n continue\n }\n\n if (c === '\\\\' && inQuotes) {\n escaped = true\n continue\n }\n\n append(c)\n lastCharWasSpace = false\n }\n\n if (!lastCharWasSpace) {\n args.push(arg.trim())\n }\n\n return args\n }\n\n private async checkShallowClone(settings: ExecuteSettings | CommandSettings, workDir: string): Promise {\n if (!settings.disableShallowCloneCheck) {\n const isShallowResult = await this.execute('git', ['-C', workDir, 'rev-parse', '--is-shallow-repository'])\n if (isShallowResult.code === 0 && isShallowResult.stdout?.trim() === 'true') {\n throw new Error(\n 'The repository is shallow. Consider disabling shallow clones. See https://github.com/GitTools/actions/blob/main/docs/cloning.md for more information.'\n )\n }\n }\n }\n\n private toCamelCase(input: string): string {\n return input.replace(/^\\w|[A-Z]|\\b\\w|\\s+/g, function (match, index) {\n if (+match === 0) return '' // or if (/\\s+/.test(match)) for white spaces\n return index === 0 ? match.toLowerCase() : match.toUpperCase()\n })\n }\n}\n","import { type ExecResult, type IBuildAgent } from '@agents/common'\nimport { type IRunner } from '@tools/common'\nimport { type Commands, type GitVersionOutput } from './models'\nimport { GitVersionTool } from './tool'\n\nexport class Runner implements IRunner {\n private readonly gitVersionTool: GitVersionTool\n\n constructor(private readonly buildAgent: IBuildAgent) {\n this.gitVersionTool = new GitVersionTool(this.buildAgent)\n }\n\n async run(command: Commands): Promise {\n switch (command) {\n case 'setup':\n return await this.setup()\n case 'execute':\n return await this.execute()\n case 'command':\n return await this.command()\n }\n }\n\n private async setup(): Promise {\n try {\n this.disableTelemetry()\n\n this.buildAgent.debug('Installing GitVersion')\n const toolPath = await this.gitVersionTool.install()\n\n const pathVariable = this.gitVersionTool.toolPathVariable\n this.buildAgent.info(`Set ${pathVariable} to ${toolPath}`)\n this.buildAgent.setVariable(pathVariable, toolPath)\n\n this.buildAgent.setSucceeded('GitVersion installed successfully', true)\n return {\n code: 0\n }\n } catch (error) {\n if (error instanceof Error) {\n this.buildAgent.setFailed(error.message, true)\n }\n return {\n code: -1,\n error: error as Error\n }\n }\n }\n\n private async execute(): Promise {\n try {\n this.disableTelemetry()\n\n this.buildAgent.info('Executing GitVersion')\n\n const result = await this.gitVersionTool.executeJson()\n\n if (result.code === 0) {\n this.buildAgent.info('GitVersion executed successfully')\n const stdout: string = result.stdout as string\n\n this.buildAgent.info('GitVersion output:')\n this.buildAgent.info('-------------------')\n this.buildAgent.info(stdout)\n this.buildAgent.info('-------------------')\n this.buildAgent.debug('Parsing GitVersion output')\n\n if (stdout.lastIndexOf('{') === -1 || stdout.lastIndexOf('}') === -1) {\n this.buildAgent.debug('GitVersion output is not valid JSON')\n this.buildAgent.setFailed('GitVersion output is not valid JSON', true)\n return {\n code: -1,\n error: new Error('GitVersion output is not valid JSON')\n }\n } else {\n const jsonOutput = stdout.substring(stdout.lastIndexOf('{'), stdout.lastIndexOf('}') + 1)\n\n const gitVersionOutput = JSON.parse(jsonOutput) as GitVersionOutput\n this.gitVersionTool.writeGitVersionToAgent(gitVersionOutput)\n this.buildAgent.setSucceeded('GitVersion executed successfully', true)\n return result\n }\n } else {\n this.buildAgent.debug('GitVersion failed')\n const error = result.error\n if (error instanceof Error) {\n this.buildAgent.setFailed(error.message, true)\n }\n return result\n }\n } catch (error) {\n if (error instanceof Error) {\n this.buildAgent.setFailed(error.message, true)\n }\n return {\n code: -1,\n error: error as Error\n }\n }\n }\n\n private async command(): Promise {\n try {\n this.disableTelemetry()\n\n this.buildAgent.info('Executing GitVersion')\n\n const result = await this.gitVersionTool.executeCommand()\n\n if (result.code === 0) {\n this.buildAgent.info('GitVersion executed successfully')\n const stdout = result.stdout as string\n\n this.buildAgent.info('GitVersion output:')\n this.buildAgent.info('-------------------')\n this.buildAgent.info(stdout)\n this.buildAgent.info('-------------------')\n\n this.buildAgent.setSucceeded('GitVersion executed successfully', true)\n return result\n } else {\n this.buildAgent.debug('GitVersion failed')\n const error = result.error\n if (error instanceof Error) {\n this.buildAgent.setFailed(error.message, true)\n }\n return result\n }\n } catch (error) {\n if (error instanceof Error) {\n this.buildAgent.setFailed(error.message, true)\n }\n return {\n code: -1,\n error: error as Error\n }\n }\n }\n\n private disableTelemetry(): void {\n this.buildAgent.info(`Running on: '${this.buildAgent.agentName}'`)\n this.buildAgent.debug('Disabling telemetry')\n this.gitVersionTool.disableTelemetry()\n }\n}\n"],"names":[],"mappings":";;;;;;;AASO,MAAM,mCAAmC,gBAAwD,CAAA;AAAA,EACpG,kBAAsC,GAAA;AAClC,IAAA,MAAM,UAAa,GAAA,IAAA,CAAK,UAAW,CAAA,QAAA,CAA0B,YAAY,CAAA;AAEzE,IAAA,MAAM,YAAe,GAAA,IAAA,CAAK,UAAW,CAAA,eAAA,CAAiC,cAAc,CAAA;AACpF,IAAA,MAAM,oBAAuB,GAAA,IAAA,CAAK,UAAW,CA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