fix build
This commit is contained in:
parent
a26ae2bcc1
commit
8afc4c7135
28
Makefile
28
Makefile
|
@ -1,9 +1,21 @@
|
|||
# to build by hand export GO111MODULE=off
|
||||
VERSION = $(shell git describe --tags)
|
||||
BUILDTIME = $(shell date +%Y.%m.%d)
|
||||
|
||||
all: build
|
||||
reset
|
||||
./forge
|
||||
|
||||
build:
|
||||
GO111MODULE=off go build \
|
||||
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
|
||||
|
||||
verbose:
|
||||
GO111MODULE=off go build -v -x \
|
||||
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
|
||||
|
||||
install:
|
||||
GO111MODULE=off go install \
|
||||
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
|
||||
|
||||
only-me: build
|
||||
reset
|
||||
./forge --only-me
|
||||
|
@ -14,21 +26,13 @@ stderr: build
|
|||
|
||||
goimports:
|
||||
goimports -w *.go
|
||||
# // to globally reset paths:
|
||||
# // gofmt -w -r '"go.wit.com/gui/gadgets" -> "go.wit.com/lib/gadgets"' *.go
|
||||
@# // to globally reset paths:
|
||||
@# // gofmt -w -r '"go.wit.com/gui/gadgets" -> "go.wit.com/lib/gadgets"' *.go
|
||||
|
||||
gocui: build
|
||||
reset
|
||||
./forge --gui gocui >/tmp/forge.log 2>&1
|
||||
|
||||
build:
|
||||
echo "build it!"
|
||||
GO111MODULE=off go build -v -x
|
||||
|
||||
install:
|
||||
go install -v -x
|
||||
forge
|
||||
|
||||
check-git-clean:
|
||||
@git diff-index --quiet HEAD -- || (echo "Git repository is dirty, please commit your changes first"; exit 1)
|
||||
|
||||
|
|
|
@ -9,7 +9,6 @@ import (
|
|||
|
||||
"go.wit.com/gui"
|
||||
"go.wit.com/lib/gadgets"
|
||||
"go.wit.com/lib/gui/repolist"
|
||||
"go.wit.com/lib/gui/shell"
|
||||
)
|
||||
|
||||
|
@ -74,7 +73,9 @@ func globalBuildOptions(vbox *gui.Node) {
|
|||
me.setBranchB = grid.NewButton("set current branch to:", func() {
|
||||
targetName := me.newBranch.String()
|
||||
log.Warn("setting all branches to", targetName)
|
||||
for _, repo := range repolist.AllRepos() {
|
||||
loop := me.repos.View.ReposSortByName()
|
||||
for loop.Scan() {
|
||||
repo := loop.Repo()
|
||||
repo.Status.CheckoutBranch(targetName)
|
||||
repo.Scan()
|
||||
}
|
||||
|
|
16
repoview.go
16
repoview.go
|
@ -68,7 +68,9 @@ func makeRepoView() *repoWindow {
|
|||
}
|
||||
|
||||
func (r *repoWindow) showApps() {
|
||||
for _, repo := range r.View.AllRepos() {
|
||||
loop := me.repos.View.ReposSortByName()
|
||||
for loop.Scan() {
|
||||
repo := loop.Repo()
|
||||
switch repo.Status.RepoType() {
|
||||
case "binary":
|
||||
//log.Info("compile here. Show()")
|
||||
|
@ -124,7 +126,9 @@ func (r *repoWindow) repoAllButtons() *gui.Node {
|
|||
r.Disable()
|
||||
defer r.Enable()
|
||||
r.showApps()
|
||||
for _, repo := range r.View.AllRepos() {
|
||||
loop := me.repos.View.ReposSortByName()
|
||||
for loop.Scan() {
|
||||
repo := loop.Repo()
|
||||
if repo.Hidden() {
|
||||
// log.Info("skip hidden", repo.String())
|
||||
} else {
|
||||
|
@ -147,7 +151,9 @@ func (r *repoWindow) repoAllButtons() *gui.Node {
|
|||
|
||||
func (r *repoWindow) mergeAllDevelToMain() bool {
|
||||
log.Info("merge all here")
|
||||
for _, repo := range r.View.AllRepos() {
|
||||
loop := me.repos.View.ReposSortByName()
|
||||
for loop.Scan() {
|
||||
repo := loop.Repo()
|
||||
if repo.ReadOnly() {
|
||||
log.Info("skipping readonly", repo.Name(), repo.State())
|
||||
continue
|
||||
|
@ -177,7 +183,9 @@ func (r *repoWindow) mergeAllDevelToMain() bool {
|
|||
|
||||
func (r *repoWindow) mergeAllUserToDevel() bool {
|
||||
log.Info("merge all here")
|
||||
for _, repo := range r.View.AllRepos() {
|
||||
loop := me.repos.View.ReposSortByName()
|
||||
for loop.Scan() {
|
||||
repo := loop.Repo()
|
||||
if repo.ReadOnly() {
|
||||
log.Info("skipping readonly", repo.Name(), repo.State())
|
||||
continue
|
||||
|
|
|
@ -57,7 +57,9 @@ func submitPatchesBox(box *gui.Node) *patchSummary {
|
|||
|
||||
s.grid.NewButton("Update Patch Counts", func() {
|
||||
var repocount, patchcount int
|
||||
for _, repo := range repolist.AllRepos() {
|
||||
loop := me.repos.View.UnmergedRepos()
|
||||
for loop.Scan() {
|
||||
repo := loop.Repo()
|
||||
if repo.ReadOnly() {
|
||||
continue
|
||||
}
|
||||
|
@ -72,7 +74,9 @@ func submitPatchesBox(box *gui.Node) *patchSummary {
|
|||
|
||||
repocount = 0
|
||||
patchcount = 0
|
||||
for _, repo := range repolist.AllRepos() {
|
||||
loop = me.repos.View.UnmergedRepos()
|
||||
for loop.Scan() {
|
||||
repo := loop.Repo()
|
||||
if repo.ReadOnly() {
|
||||
continue
|
||||
}
|
||||
|
@ -208,7 +212,9 @@ func (s *patchSummary) Update() {
|
|||
var total, totalgo, dirty, readonly int
|
||||
var userT, develT, masterT int
|
||||
// var userP, develP, masterP int
|
||||
for _, repo := range repolist.AllRepos() {
|
||||
loop := me.repos.View.UnmergedRepos()
|
||||
for loop.Scan() {
|
||||
repo := loop.Repo()
|
||||
total += 1
|
||||
if repo.Status.IsDirty() {
|
||||
dirty += 1
|
||||
|
|
Loading…
Reference in New Issue