diff --git a/main.go b/main.go index 05f2da3..560bb89 100644 --- a/main.go +++ b/main.go @@ -151,7 +151,7 @@ func setAllBranchesToMaster() bool { if repo.IsDirty() { continue } - if whitelist(repo.GoPath()) { + if repo.Status.Whitelist { continue } if repo.Status.CheckoutMaster() { diff --git a/releaseBox.go b/releaseBox.go index 42143a5..acdcb2b 100644 --- a/releaseBox.go +++ b/releaseBox.go @@ -51,8 +51,6 @@ func (w *autoType) Enable() { } func createReleaseBox(box *gui.Node) { - initWhitelist() - me.release.box = box.NewVerticalBox("vbox") me.release.group = me.release.box.NewGroup("Current Repo") me.release.grid = me.release.group.NewGrid("buildOptions", 0, 0) @@ -186,7 +184,7 @@ func createReleaseBox(box *gui.Node) { if repo.Status.ReadOnly() { continue } - if whitelist(repo.GoPath()) { + if repo.Status.Whitelist { log.Warn("skipping whitelist", repo.GoPath()) continue } @@ -281,9 +279,6 @@ func findNext() bool { if repo.Status.IsReleased() { continue } - if whitelist(repo.GoPath()) { - continue - } if repo.Status.Whitelist { continue } diff --git a/whitelist.go b/whitelist.go deleted file mode 100644 index d8c6c77..0000000 --- a/whitelist.go +++ /dev/null @@ -1,42 +0,0 @@ -// This is a simple example -package main - -import ( - "strings" - - "go.wit.com/lib/gui/repolist" -) - -func initWhitelist() { - me.release.whitelist = make(map[string]*repolist.RepoRow) - for _, repo := range me.repos.View.AllRepos() { - if strings.HasPrefix(repo.GoPath(), "go.wit.com/dev/davecgh") { - repo.Status.Whitelist = true - // me.release.whitelist[repo.GoPath()] = repo - } - // - // if repo.String() == "go.wit.com/apps/guireleaser" { - // me.release.whitelist[repo.String()] = repo - // } - // - // if repo.String() == "go.wit.com/lib/gui/repostatus" { - // me.release.whitelist[repo.String()] = repo - // } - // - } -} - -func whitelist(path string) bool { - // log.Info("whitelist START", path) - // if me.ignoreWhitelist.Checked() { - // return false - // } - - _, ok := me.release.whitelist[path] - if ok { - // log.Info("whitelist ok == true", path) - return true - } - // log.Info("whitelist ok == false", path) - return false -}