From bbd34df59901780b79ccc5748dbeb10639189a2d Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sun, 5 Jan 2025 18:42:12 -0600 Subject: [PATCH] duh. logic was backwards --- currentVersions.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/currentVersions.go b/currentVersions.go index 9ad136f..1c2c822 100644 --- a/currentVersions.go +++ b/currentVersions.go @@ -289,15 +289,15 @@ func (repo *Repo) IncrementTargetRevision() bool { // first try just going from the last tag repo.incrementRevision(repo.GetLastTag()) - if verifyNewerVersion(repo.GetMasterVersion(), repo.GetTargetVersion()) { + if !isNewerVersion(repo.GetMasterVersion(), repo.GetTargetVersion()) { log.Info("master version() is higher than target version", repo.GetMasterVersion(), repo.GetTargetVersion()) repo.incrementRevision(repo.GetMasterVersion()) } - if verifyNewerVersion(repo.GetLastTag(), repo.GetTargetVersion()) { + if !isNewerVersion(repo.GetLastTag(), repo.GetTargetVersion()) { log.Info("last tag versn() is higher than target version", repo.GetLastTag(), repo.GetTargetVersion()) return false } - if verifyNewerVersion(repo.GetMasterVersion(), repo.GetTargetVersion()) { + if !isNewerVersion(repo.GetMasterVersion(), repo.GetTargetVersion()) { log.Info("master version() is higher than target version", repo.GetMasterVersion(), repo.GetTargetVersion()) return false } @@ -329,7 +329,7 @@ func (repo *Repo) incrementRevision(lasttag string) { // A = major = 3 // B = minor = 1 // C = revision = 4 -func verifyNewerVersion(oldver, newver string) bool { +func isNewerVersion(oldver, newver string) bool { olda, oldb, oldc := splitVersion(oldver) newa, newb, newc := splitVersion(newver)