Skip to content

Commit

Permalink
Fix first release again
Browse files Browse the repository at this point in the history
  • Loading branch information
egoist committed Dec 29, 2021
1 parent e0c0ddc commit 5a9f4e9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
## Unreleased

- Fix first release again

## 0.9.6
## 0.9.6

- Fix changelog heading

Expand Down
8 changes: 7 additions & 1 deletion src/publish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,13 @@ async function getLatestTag(): Promise<string | null> {
const { stdout } = await execa("git", ["describe", "--abbrev=0", "--tags"]);
return stdout;
} catch (error: any) {
if (error.stderr && error.stderr.includes("fatal: No tags can describe")) {
if (
error.stderr &&
(error.stderr.includes("fatal: No tags can describe") ||
error.stderr.includes(
"fatal: No names found, cannot describe anything"
))
) {
return null;
}
throw error;
Expand Down

0 comments on commit 5a9f4e9

Please sign in to comment.