mirror of
https://github.com/goreleaser/goreleaser-action.git
synced 2026-05-15 23:20:32 +00:00
fix: Don't fail on getTag (#98)
This commit is contained in:
parent
bd6280fd12
commit
09847f1406
2 changed files with 11 additions and 2 deletions
7
lib/git.js
generated
7
lib/git.js
generated
|
|
@ -37,7 +37,12 @@ function isTagDirty(currentTag) {
|
|||
exports.isTagDirty = isTagDirty;
|
||||
function getTag() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return yield git(['describe', '--tags', '--abbrev=0']);
|
||||
try {
|
||||
return yield git(['describe', '--tags', '--abbrev=0']);
|
||||
}
|
||||
catch (err) {
|
||||
return '';
|
||||
}
|
||||
});
|
||||
}
|
||||
exports.getTag = getTag;
|
||||
|
|
|
|||
|
|
@ -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> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue