fix: Don't fail on getTag (#98)
This commit is contained in:
parent
bd6280fd12
commit
09847f1406
|
@ -37,7 +37,12 @@ function isTagDirty(currentTag) {
|
||||||
exports.isTagDirty = isTagDirty;
|
exports.isTagDirty = isTagDirty;
|
||||||
function getTag() {
|
function getTag() {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
try {
|
||||||
return yield git(['describe', '--tags', '--abbrev=0']);
|
return yield git(['describe', '--tags', '--abbrev=0']);
|
||||||
|
}
|
||||||
|
catch (err) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
exports.getTag = getTag;
|
exports.getTag = getTag;
|
||||||
|
|
|
@ -17,7 +17,11 @@ export async function isTagDirty(currentTag: string): Promise<boolean> {
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getTag(): Promise<string> {
|
export async function getTag(): Promise<string> {
|
||||||
|
try {
|
||||||
return await git(['describe', '--tags', '--abbrev=0']);
|
return await git(['describe', '--tags', '--abbrev=0']);
|
||||||
|
} catch (err) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getShortCommit(): Promise<string> {
|
export async function getShortCommit(): Promise<string> {
|
||||||
|
|
Loading…
Reference in New Issue