0
0
mirror of https://github.com/thegeeklab/git-sv.git synced 2024-11-24 01:00:39 +00:00

refactor: fix NextVersion typo

This commit is contained in:
Beatriz Vieira 2019-11-17 13:41:00 -03:00
parent 918b871dfb
commit 8689388740
2 changed files with 5 additions and 5 deletions

View File

@ -35,7 +35,7 @@ func nextVersionHandler(git sv.Git, semverProcessor sv.SemVerCommitsProcessor) f
return fmt.Errorf("error getting git log, message: %v", err)
}
nextVer := semverProcessor.NexVersion(currentVer, commits)
nextVer := semverProcessor.NextVersion(currentVer, commits)
fmt.Printf("%d.%d.%d\n", nextVer.Major(), nextVer.Minor(), nextVer.Patch())
return nil
}
@ -76,7 +76,7 @@ func releaseNotesHandler(git sv.Git, semverProcessor sv.SemVerCommitsProcessor,
return fmt.Errorf("error getting git log, message: %v", err)
}
nextVer := semverProcessor.NexVersion(currentVer, commits)
nextVer := semverProcessor.NextVersion(currentVer, commits)
releasenote := rnProcessor.Get(commits)
fmt.Println(rnProcessor.Format(releasenote, nextVer))

View File

@ -26,7 +26,7 @@ const BreakingChangeTag string = "breakingchange"
// SemVerCommitsProcessor interface
type SemVerCommitsProcessor interface {
NexVersion(version semver.Version, commits []GitCommitLog) semver.Version
NextVersion(version semver.Version, commits []GitCommitLog) semver.Version
}
// SemVerCommitsProcessorImpl process versions using commit log
@ -47,8 +47,8 @@ func NewSemVerCommitsProcessor(unknownAsPatch bool, majorTypes, minorTypes, patc
}
}
// NexVersion calculates next version based on commit log
func (p SemVerCommitsProcessorImpl) NexVersion(version semver.Version, commits []GitCommitLog) semver.Version {
// NextVersion calculates next version based on commit log
func (p SemVerCommitsProcessorImpl) NextVersion(version semver.Version, commits []GitCommitLog) semver.Version {
var versionToUpdate = none
for _, commit := range commits {
if v := p.versionTypeToUpdate(commit); v > versionToUpdate {