create action for GRM (2)

check the options settings
This commit is contained in:
Artur Stolear
2020-02-08 10:57:00 +02:00
parent 632a7fdad0
commit 1be05ba386
7 changed files with 132 additions and 63 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -50,15 +50,24 @@ export class GitReleaseManagerTool implements IGitReleaseManagerTool {
getCreateArguments(settings: GitReleaseManagerCreateSettings): string[] {
const args: string[] = [...this.getCommonArguments(settings)];
args.push("--milestone", settings.milestone);
args.push("--name", settings.releaseName);
args.push("--targetcommitish", settings.commit);
args.push("--targetDirectory", settings.targetDirectory);
if (this.buildAgent.fileExists(settings.inputFileName)) {
args.push("--inputFilePath", settings.inputFileName);
} else {
throw new Error("GitReleaseManager inputFilePath not found at " + settings.inputFileName);
if (settings.milestone) {
args.push("--milestone", settings.milestone);
}
if (settings.releaseName) {
args.push("--name", settings.releaseName);
}
if (settings.commit) {
args.push("--targetcommitish", settings.commit);
}
if (settings.targetDirectory) {
args.push("--targetDirectory", settings.targetDirectory);
}
if (settings.inputFileName) {
if (this.buildAgent.fileExists(settings.inputFileName)) {
args.push("--inputFilePath", settings.inputFileName);
} else {
throw new Error("GitReleaseManager inputFilePath not found at " + settings.inputFileName);
}
}
if (settings.isPreRelease) {
args.push("--pre");