summaryrefslogtreecommitdiff
path: root/scanGoSum.go
blob: 51a821f40971f9719b7c8cf9716e08ed9eefe6a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// This is a simple example
package main

/*
func scanGoSum() {
	for _, repo := range me.repos.View.AllRepos() {
		if repo.GoPath() == "go.wit.com/apps/guireleaser" {
			if me.release.guireleaser == nil {
				me.release.guireleaser = repo
			}
		}
		latestversion := repo.Status.GetLastTagVersion()
		if repo.GoState() == "BAD" {
			continue
		}
		if repo.GoState() == "DIRTY" {
			continue
		}
		if repo.Status.IsPrimitive() {
			log.Info("PRIMITIVE repo:", latestversion, repo.GoPath())
			repo.SetGoState("PRIMITIVE")
			continue
		}
		if repo.CheckDirty() {
			log.Info("dirty repo:", latestversion, repo.GoPath())
			log.Info("dirty repo.getGoSumStatus =", repo.GoState())
			repo.SetGoState("DIRTY")

			// me.release.repo.SetValue(repo.status.String())
			// me.release.status.SetValue("dirty")
			// me.release.notes.SetValue("You must commit your changes\nbefore you can continue")
			// me.current = repo
			// me.release.openrepo.Enable()
			continue
		}
		status := repo.State()
		if status == "PERFECT" {
			continue
		} else {
			repo.NewScan()
		}

		log.Info("repo:", latestversion, status, repo.GoPath())
	}
	log.Info("scanGoSum() did everything, not sure what to do next")
}
*/