summaryrefslogtreecommitdiff
path: root/prepareRelease.go
diff options
context:
space:
mode:
Diffstat (limited to 'prepareRelease.go')
-rw-r--r--prepareRelease.go33
1 files changed, 28 insertions, 5 deletions
diff --git a/prepareRelease.go b/prepareRelease.go
index cab4321..78fdd34 100644
--- a/prepareRelease.go
+++ b/prepareRelease.go
@@ -19,7 +19,6 @@ func forceReleaseVersion(repo *gitpb.Repo) {
// if v1.2.3 change to v.1.2.4
repo.IncrementTargetRevision()
}
- me.forge.SetConfigSave(true)
}
func checkpkgcache(repo *gitpb.Repo) error {
@@ -37,10 +36,13 @@ func checkpkgcache(repo *gitpb.Repo) error {
}
getpath := repo.GetGoPath() + "@" + repo.GetLastTag()
+ log.Info("MISSING:", getpath)
_, err = me.startRepo.RunVerboseOnError([]string{"go", "get", getpath})
return err
}
+var rillcount int
+
func rillRestore(repo *gitpb.Repo) error {
if me.forge.Config.IsReadOnly(repo.GetGoPath()) {
return nil
@@ -48,10 +50,9 @@ func rillRestore(repo *gitpb.Repo) error {
if me.forge.Config.IsPrivate(repo.GetGoPath()) {
return nil
}
- if err := checkpkgcache(repo); err != nil {
- return err
- }
+
_, err := repo.RunStrictNew([]string{"go-mod-clean", "--restore"})
+ rillcount += 1
if err != nil {
log.Info("go-mod-clean --restore failed", repo.GetGoPath(), err)
return err
@@ -64,9 +65,26 @@ func rePrepareRelease() {
// me.forge = forgepb.Init()
me.found = new(gitpb.Repos)
+ log.Printf("rePrepareRelease() START rill go-mod-clean --restore (11 seconds?)")
+ rillcount = 0
now := time.Now()
me.forge.RillFuncError(rillRestore)
- log.Printf("showRestore() (%d total repos) took:%s\n", me.forge.Repos.Len(), shell.FormatDuration(time.Since(now)))
+ log.Printf("showRestore() (%d total repos) took:%s\n", rillcount, shell.FormatDuration(time.Since(now)))
+ log.Sleep(1)
+ all2 := me.forge.Repos.SortByFullPath()
+ for all2.Scan() {
+ check := all2.Next()
+ if me.forge.Config.IsReadOnly(check.GetGoPath()) {
+ continue
+ }
+ if me.forge.Config.IsPrivate(check.GetGoPath()) {
+ continue
+ }
+ // this should be rare? nonexistant?
+ if err := checkpkgcache(check); err != nil {
+ log.Info("go get checks failed here.", err, check.GetGoPath())
+ }
+ }
all := me.forge.Repos.SortByFullPath()
for all.Scan() {
@@ -112,6 +130,11 @@ func rePrepareRelease() {
continue
}
+ if me.forge.Config.IsPrivate(check.GetGoPath()) {
+ // only checks after this are GO dep related which don't matter for private repos
+ continue
+ }
+
if argv.Quick != nil {
// if argv has 'quick' don't do anything
// that doesn't actually have a patch