disable already downloaded repos
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
0e979faf5b
commit
3388a2dc2c
|
@ -3,6 +3,7 @@ package main
|
|||
|
||||
import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"go.wit.com/log"
|
||||
|
||||
|
@ -93,6 +94,17 @@ func globalBuildOptions(box *gui.Node) {
|
|||
newBranch.SetText("jcarr")
|
||||
|
||||
me.autoWorkingPwd = gadgets.NewOneLiner(grid, "working directory (pwd)")
|
||||
me.userHomePwd = gadgets.NewOneLiner(grid, "user home")
|
||||
me.goSrcPwd = gadgets.NewOneLiner(grid, "go src home")
|
||||
|
||||
homeDir, err := os.UserHomeDir()
|
||||
if err != nil {
|
||||
log.Warn("Error getting home directory:", err)
|
||||
homeDir = "/home/autotypist"
|
||||
}
|
||||
me.userHomePwd.SetText(homeDir)
|
||||
srcDir := filepath.Join(homeDir, "go/src")
|
||||
me.goSrcPwd.SetText(srcDir)
|
||||
|
||||
group2 := vbox.NewGroup("Run in every git repository")
|
||||
me.stopOnErrors = group2.NewCheckbox("Stop on errors")
|
||||
|
|
|
@ -5,6 +5,7 @@ import (
|
|||
"io/ioutil"
|
||||
"net/http"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"go.wit.com/gui"
|
||||
|
@ -94,8 +95,12 @@ func (s *section) add(path string) {
|
|||
lw.Disable()
|
||||
log.Info("downloading", tmp.path.String(), "here")
|
||||
os.Setenv("GO111MODULE", "off")
|
||||
fullpath := "/home/jcarr/go/src/go.wit.com/"
|
||||
quickCmd(fullpath, []string{"go", "get", "-v", tmp.path.String()})
|
||||
|
||||
goSrcDir := me.goSrcPwd.String()
|
||||
quickCmd(goSrcDir, []string{"go", "get", "-v", tmp.path.String()})
|
||||
|
||||
fullpath := filepath.Join(goSrcDir, tmp.path.String())
|
||||
quickCmd(fullpath, []string{"go", "get", "-v", "-u", "."})
|
||||
lw.Enable()
|
||||
})
|
||||
if repostatus.VerifyLocalGoRepo(path) {
|
||||
|
|
|
@ -55,6 +55,12 @@ type autoType struct {
|
|||
// The current working directory
|
||||
autoWorkingPwd *gadgets.OneLiner
|
||||
|
||||
// what is being used as your home dir
|
||||
userHomePwd *gadgets.OneLiner
|
||||
|
||||
// what is being used as ~/go/src
|
||||
goSrcPwd *gadgets.OneLiner
|
||||
|
||||
downloadEverythingButton *gui.Node
|
||||
|
||||
// delete ~/go/src & ~/go/pkg buttons
|
||||
|
|
Loading…
Reference in New Issue