guireleaser runs again
This commit is contained in:
parent
76efd35e3e
commit
e9352172ac
1
Makefile
1
Makefile
|
@ -1,5 +1,6 @@
|
|||
all:
|
||||
@echo this is a go library, not a binary
|
||||
@GO111MODULE=off go build
|
||||
|
||||
goimports:
|
||||
goimports -w *.go
|
||||
|
|
|
@ -7,23 +7,23 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
"go.wit.com/lib/gui/repolist"
|
||||
"go.wit.com/log"
|
||||
"go.wit.com/lib/gui/repostatus"
|
||||
)
|
||||
|
||||
func dumpVersions() {
|
||||
func dumpVersions(view *repolist.RepoList) {
|
||||
f, _ := os.OpenFile("/tmp/go.wit.com.versions", os.O_WRONLY|os.O_CREATE, 0600)
|
||||
defer f.Close()
|
||||
for _, sec := range allsections {
|
||||
for _, wrepo := range sec.witRepos {
|
||||
var r *repostatus.RepoStatus
|
||||
r = repostatus.FindPath(wrepo.path.String())
|
||||
var r *repolist.Repo
|
||||
r = view.FindRepo(wrepo.path.String())
|
||||
if r == nil {
|
||||
log.Info("repo not scanned for some reason", wrepo.path.String())
|
||||
continue
|
||||
}
|
||||
lastTag := r.GetLastTagVersion()
|
||||
_, out := r.RunCmd([]string{"git", "log", "-1", "--format=%at", lastTag})
|
||||
lastTag := r.LastTag()
|
||||
_, out := r.Status.RunCmd([]string{"git", "log", "-1", "--format=%at", lastTag})
|
||||
out = strings.TrimSpace(out)
|
||||
|
||||
// Convert the string to an integer
|
||||
|
|
|
@ -14,6 +14,7 @@ import (
|
|||
|
||||
"go.wit.com/lib/gadgets"
|
||||
"go.wit.com/lib/gui/repostatus"
|
||||
"go.wit.com/lib/gui/repolist"
|
||||
"go.wit.com/lib/gui/shell"
|
||||
)
|
||||
|
||||
|
@ -68,7 +69,7 @@ func myrepolist() []string {
|
|||
return lines
|
||||
}
|
||||
|
||||
func ListWindow() *gadgets.BasicWindow {
|
||||
func ListWindow(view *repolist.RepoList) *gadgets.BasicWindow {
|
||||
if lw != nil {
|
||||
if lw.Hidden() {
|
||||
lw.Show()
|
||||
|
@ -85,7 +86,7 @@ func ListWindow() *gadgets.BasicWindow {
|
|||
box := lw.Box()
|
||||
group := box.NewGroup("list")
|
||||
group.NewButton("make new go version list", func() {
|
||||
dumpVersions()
|
||||
dumpVersions(view)
|
||||
})
|
||||
|
||||
var lines []string
|
||||
|
@ -95,7 +96,7 @@ func ListWindow() *gadgets.BasicWindow {
|
|||
for i, line := range myrepolist() {
|
||||
parts := strings.Split(line, " ")
|
||||
log.Info("adding:", i, parts)
|
||||
currents.add(parts[0])
|
||||
currents.add(view, parts[0])
|
||||
}
|
||||
|
||||
lines = dumpURL("https://go.wit.com/list")
|
||||
|
@ -111,7 +112,7 @@ func ListWindow() *gadgets.BasicWindow {
|
|||
log.Warn(i, line)
|
||||
parts := strings.Split(line, " ")
|
||||
if currents != nil {
|
||||
currents.add(parts[0])
|
||||
currents.add(view, parts[0])
|
||||
}
|
||||
}
|
||||
for i, sec := range allsections {
|
||||
|
@ -184,7 +185,7 @@ func (r *witRepo) doDownload() bool {
|
|||
return true
|
||||
}
|
||||
|
||||
func (s *section) add(path string) {
|
||||
func (s *section) add(view *repolist.RepoList, path string) {
|
||||
if s == nil {
|
||||
return
|
||||
}
|
||||
|
@ -196,7 +197,7 @@ func (s *section) add(path string) {
|
|||
tmp.doDownload()
|
||||
lw.Enable()
|
||||
})
|
||||
repo := repostatus.FindPath(path)
|
||||
repo := view.FindRepo(path)
|
||||
if repo != nil {
|
||||
log.Verbose("repo is already downloaded", path)
|
||||
tmp.downloadB.SetLabel("downloaded")
|
||||
|
|
Loading…
Reference in New Issue