add publish GRM command
This commit is contained in:
@@ -11,6 +11,7 @@ import {
|
||||
GitReleaseManagerDiscardSettings,
|
||||
GitReleaseManagerCloseSettings,
|
||||
GitReleaseManagerOpenSettings,
|
||||
GitReleaseManagerPublishSettings,
|
||||
} from "./models";
|
||||
|
||||
export interface IGitReleaseManagerTool extends IDotnetTool {
|
||||
@@ -19,6 +20,7 @@ export interface IGitReleaseManagerTool extends IDotnetTool {
|
||||
discard(settings: GitReleaseManagerDiscardSettings): Promise<IExecResult>;
|
||||
close(settings: GitReleaseManagerCloseSettings): Promise<IExecResult>;
|
||||
open(settings: GitReleaseManagerOpenSettings): Promise<IExecResult>;
|
||||
publish(settings: GitReleaseManagerPublishSettings): Promise<IExecResult>;
|
||||
}
|
||||
|
||||
@injectable()
|
||||
@@ -59,6 +61,12 @@ export class GitReleaseManagerTool extends DotnetTool implements IGitReleaseMana
|
||||
return this.execute("dotnet-gitreleasemanager", args);
|
||||
}
|
||||
|
||||
public publish(settings: GitReleaseManagerPublishSettings): Promise<IExecResult> {
|
||||
const args = this.getPublishArguments(settings);
|
||||
|
||||
return this.execute("dotnet-gitreleasemanager", args);
|
||||
}
|
||||
|
||||
getCommonArguments(settings: GitReleaseManagerSettings): string[] {
|
||||
const args: string[] = [];
|
||||
|
||||
@@ -103,6 +111,16 @@ export class GitReleaseManagerTool extends DotnetTool implements IGitReleaseMana
|
||||
return args;
|
||||
}
|
||||
|
||||
getPublishArguments(settings: GitReleaseManagerPublishSettings): string[] {
|
||||
const args: string[] = ['publish', ...this.getCommonArguments(settings)];
|
||||
|
||||
if (settings.tagName) {
|
||||
args.push("--tagName", settings.tagName);
|
||||
}
|
||||
|
||||
return args;
|
||||
}
|
||||
|
||||
getCreateArguments(settings: GitReleaseManagerCreateSettings): string[] {
|
||||
const args: string[] = ['create', ...this.getCommonArguments(settings)];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user