fix: Don't fail on getTag (#98)

This commit is contained in:
CrazyMax
2020-02-14 18:25:27 +01:00
committed by GitHub
parent bd6280fd12
commit 09847f1406
2 changed files with 11 additions and 2 deletions
+5 -1
View File
@@ -17,7 +17,11 @@ export async function isTagDirty(currentTag: string): Promise<boolean> {
}
export async function getTag(): Promise<string> {
return await git(['describe', '--tags', '--abbrev=0']);
try {
return await git(['describe', '--tags', '--abbrev=0']);
} catch (err) {
return '';
}
}
export async function getShortCommit(): Promise<string> {