in eng/tools/spec-gen-sdk-runner/src/command-helpers.ts [99:141]
export function prepareSpecGenSdkCommand(commandInput: SpecGenSdkCmdInput): string[] {
const specGenSdkCommand = [];
specGenSdkCommand.push(
"spec-gen-sdk",
"--scp",
commandInput.localSpecRepoPath,
"--sdp",
commandInput.localSdkRepoPath,
"--wf",
commandInput.workingFolder,
"-l",
commandInput.sdkRepoName,
"-c",
commandInput.specCommitSha,
"--rm",
commandInput.runMode,
);
if (commandInput.specRepoHttpsUrl) {
specGenSdkCommand.push("--spec-repo-https-url", commandInput.specRepoHttpsUrl);
}
if (commandInput.prNumber) {
specGenSdkCommand.push("--pr-number", commandInput.prNumber);
}
if (commandInput.tspConfigPath) {
specGenSdkCommand.push("--tsp-config-relative-path", commandInput.tspConfigPath);
}
if (commandInput.readmePath) {
specGenSdkCommand.push("--readme-relative-path", commandInput.readmePath);
}
if (commandInput.headRepoHttpsUrl) {
specGenSdkCommand.push("--head-repo-url", commandInput.headRepoHttpsUrl);
}
if (commandInput.headBranch) {
specGenSdkCommand.push("--head-branch", commandInput.headBranch);
}
if (commandInput.apiVersion) {
specGenSdkCommand.push("--api-version", commandInput.apiVersion);
}
if (commandInput.sdkReleaseType) {
specGenSdkCommand.push("--sdk-release-type", commandInput.sdkReleaseType);
}
return specGenSdkCommand;
}