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