Skip to content

Commit

Permalink
fix: validate tag existence in new repos
Browse files Browse the repository at this point in the history
  • Loading branch information
barelyhuman committed Aug 30, 2023
1 parent 4847094 commit 1f38e25
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ func (g *Generator) readCommitsInTags() (err error) {
}
}

if latestTagCommit == nil && previousTagCommit == nil {
err = fmt.Errorf("failed to get tags, check if you have at least one tag or provide commit references instead")
return
}

commitsIter, err = g.repo.Log(&git.LogOptions{From: latestTagCommit.Hash})

if err != nil {
Expand Down

0 comments on commit 1f38e25

Please sign in to comment.