From b57144e6bfe8a6b63d2d2f8ffb47af04a926ae8b Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Wed, 29 Jan 2025 20:01:07 -0600 Subject: some useful helper functions --- currentVersions.go | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'currentVersions.go') diff --git a/currentVersions.go b/currentVersions.go index 7f64335..0f09cdf 100644 --- a/currentVersions.go +++ b/currentVersions.go @@ -294,23 +294,25 @@ func (repo *Repo) IncrementTargetMinor() { } // changes the target revision. v0.1.3 becomes v0.1.4 -func (repo *Repo) IncrementTargetRevision() bool { +func (repo *Repo) IncrementTargetRevision() { // first try just going from the last tag repo.incrementRevision(repo.GetLastTag()) if !isNewerVersion(repo.GetMasterVersion(), repo.GetTargetVersion()) { - log.Printf("master version() %s is higher than target version %s\n", repo.GetMasterVersion(), repo.GetTargetVersion()) + // log.Printf("tag error. master version() %s was higher than target version %s\n", repo.GetMasterVersion(), repo.GetTargetVersion()) repo.incrementRevision(repo.GetMasterVersion()) } - if !isNewerVersion(repo.GetLastTag(), repo.GetTargetVersion()) { - log.Printf("last tag versn() %s is higher than target version %s\n", repo.GetLastTag(), repo.GetTargetVersion()) - return false - } - if !isNewerVersion(repo.GetMasterVersion(), repo.GetTargetVersion()) { - log.Printf("master version() %s is higher than target version %s\n", repo.GetMasterVersion(), repo.GetTargetVersion()) - return false - } - return true + /* + if !isNewerVersion(repo.GetLastTag(), repo.GetTargetVersion()) { + log.Printf("last tag versn() %s is higher than target version %s\n", repo.GetLastTag(), repo.GetTargetVersion()) + return false + } + if !isNewerVersion(repo.GetMasterVersion(), repo.GetTargetVersion()) { + log.Printf("master version() %s is higher than target version %s\n", repo.GetMasterVersion(), repo.GetTargetVersion()) + return false + } + return true + */ } func (repo *Repo) incrementRevision(lasttag string) { -- cgit v1.2.3