diff options
| author | Jeff Carr <[email protected]> | 2024-12-14 16:29:14 -0600 | 
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-12-14 16:29:14 -0600 | 
| commit | e214aff7db86ab27f2ddd6e33f50bf3e2b00dbd7 (patch) | |
| tree | b30565dc53935625eaf385b19f31b060039ab0cf | |
| parent | 1c8f55d397acb6b653d83f050d15329d7de33bfd (diff) | |
keep trying to automate thisv0.22.37
| -rw-r--r-- | prepareRelease.go | 34 | 
1 files changed, 23 insertions, 11 deletions
diff --git a/prepareRelease.go b/prepareRelease.go index 45ecfe1..70d829b 100644 --- a/prepareRelease.go +++ b/prepareRelease.go @@ -50,10 +50,9 @@ func makePrepareRelease() {  			continue  		} +		// run go-mod-clean on every repo to start  		if !runGoClean(check) {  			log.Info("go-mod-clean FAILED. THIS IS BAD.", check.GoPath) -			log.Info("go-mod-clean FAILED. THIS IS BAD.", check.GoPath) -			log.Info("go-mod-clean FAILED. THIS IS BAD.", check.GoPath)  		}  	} @@ -71,19 +70,32 @@ func makePrepareRelease() {  		if master != lastTag {  			// if v1.2.3 change to v.1.2.4  			check.IncrementTargetRevision() +			if !runGoClean(check) { +				log.Info("go-mod-clean FAILED. THIS IS BAD.", check.GoPath) +			}  			continue  		}  		// if the repo is a go binary, try forcing new go.* files -		if check.RepoType() == "binary" { -			// check if the package dependancies changed, if so, re-publish -			if me.forge.FinalGoDepsCheckOk(check) { -				log.Printf("go.sum is perfect! %s\n", check.GetGoPath()) -			} else { -				log.Printf("dependancy checks indicate a new release is needed for %s\n", check.GetGoPath()) -				// if v1.2.3 change to v.1.2.4 -				check.IncrementTargetRevision() -			} +		if check.RepoType() != "binary" { +			// master and lasttag match and it's not a binary. everything is fine +			continue +		} +		// check if the package dependancies changed, if so, re-publish +		if me.forge.FinalGoDepsCheckOk(check) { +			log.Printf("go.sum is perfect! %s\n", check.GetGoPath()) +			continue +		} +		log.Printf("dependancy checks indicate a new release is needed for %s\n", check.GetGoPath()) +		// if v1.2.3 change to v.1.2.4 +		check.IncrementTargetRevision() +		// run go-mod-clean in each repo that needs to be updated +		if master == lastTag { +			// 'git notes' has something in it. clear it out +			check.Run([]string{"git", "notes", "remove"}) +		} +		if !runGoClean(check) { +			log.Info("go-mod-clean FAILED. THIS IS BAD.", check.GoPath)  		}  	}  | 
