Skip to content

Commit

Permalink
fix: isRefGitTag check
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Jun 15, 2022
1 parent 39f6888 commit 81f6bdc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/git.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export async function getLastGitTag(delta = -1) {
export async function isRefGitTag(to: string) {
const { execa } = await import('execa')
try {
await execa('git', ['describe', '--exact-match', to], { reject: true })
await execa('git', ['show-ref', '--verify', `refs/tags/${to}`], { reject: true })
}
catch {
return false
Expand Down
1 change: 1 addition & 0 deletions src/markdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ function formatTitle(name: string) {
function formatSection(commits: GitCommit[], sectionName: string, options: ResolvedChangelogOptions) {
if (!commits.length)
return []

const lines: string[] = [
'',
formatTitle(sectionName),
Expand Down

0 comments on commit 81f6bdc

Please sign in to comment.