diff options
Diffstat (limited to 'src/git-command-manager.ts')
| -rw-r--r-- | src/git-command-manager.ts | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/git-command-manager.ts b/src/git-command-manager.ts index 01aedfe..ab07524 100644 --- a/src/git-command-manager.ts +++ b/src/git-command-manager.ts @@ -41,6 +41,7 @@ export interface IGitCommandManager { submoduleForeach(command: string, recursive: boolean): Promise<string> submoduleSync(recursive: boolean): Promise<void> submoduleUpdate(fetchDepth: number, recursive: boolean): Promise<void> + submoduleStatus(): Promise<boolean> tagExists(pattern: string): Promise<boolean> tryClean(): Promise<boolean> tryConfigUnset(configKey: string, globalConfig?: boolean): Promise<boolean> @@ -357,6 +358,12 @@ class GitCommandManager { await this.execGit(args) } + async submoduleStatus(): Promise<boolean> { + const output = await this.execGit(['submodule', 'status'], true) + core.debug(output.stdout) + return output.exitCode === 0 + } + async tagExists(pattern: string): Promise<boolean> { const output = await this.execGit(['tag', '--list', pattern]) return !!output.stdout.trim() |
