Skip to content

Commit

Permalink
fix: don't ignore changelog init flags.
Browse files Browse the repository at this point in the history
  • Loading branch information
outofcoffee committed Sep 3, 2023
1 parent 2bf749b commit 8344b2f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 4 additions & 0 deletions changelog/changelog.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,10 @@ func InitChangelog(
}

_, updated := GetUpdatedChangelog(config, changelogFile, orderBy, repoPath, latestTag, "", unique)
err = WriteChangelog(changelogFile, updated)
if err != nil {
return "", fmt.Errorf("failed to write to initialised changelog: %s: %v", changelogFile, err)
}

return updated, nil
}
6 changes: 3 additions & 3 deletions cmd/changelog_init.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ var initCmd = &cobra.Command{
)
initChangelog(
changelogFile,
vcs.TagOrderBy(generateArgs.orderBy),
generateArgs.repoPath,
generateArgs.unique,
vcs.TagOrderBy(initArgs.orderBy),
initArgs.repoPath,
initArgs.unique,
)
},
}
Expand Down
1 change: 1 addition & 0 deletions vcs/tags.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ func GetEarliestTag(repoPath string, orderBy TagOrderBy) (string, error) {
return "", err
}
earliestTag = tag
logrus.Debugf("earliest tag: %s", earliestTag)
}
return earliestTag, nil
}
Expand Down

0 comments on commit 8344b2f

Please sign in to comment.