attempt to stabilize deb package creation

This commit is contained in:
Jeff Carr 2025-02-14 18:39:14 -06:00
parent 339f5ff27e
commit 48585f15a5
1 changed files with 137 additions and 133 deletions

38
main.go
View File

@ -4,7 +4,6 @@
package main package main
import ( import (
"errors"
"fmt" "fmt"
"os" "os"
"path/filepath" "path/filepath"
@ -103,19 +102,38 @@ func main() {
} }
doListRepos() doListRepos()
if argv.DebBuild != nil { if argv.DebBuild != nil {
buildDeb() buildDeb()
okExit("") okExit("")
} }
if argv.MakeInstall != nil { if argv.MakeInstall != nil {
if err := doInstall(); err != nil { if err := doInstall(); err != nil {
log.Info("doInstall() failed", err) log.Info("doInstall() failed", err)
badExit(err) badExit(err)
} else { }
okExit("EVERYTHING BUILT!") okExit("EVERYTHING BUILT!")
} }
if argv.Test {
homeDir, _ := os.UserHomeDir()
testdir := filepath.Join(homeDir, "go/src/go.wit.com/apps/utils/wit-utils/go-clone-test/")
os.Chdir(testdir)
shell.RunRealtime([]string{"go", "install"})
workdir := filepath.Join(homeDir, "gowork")
if err := os.MkdirAll(workdir, os.ModePerm); err != nil {
badExit(err)
}
os.Chdir(workdir)
shell.RunRealtime([]string{"go-clone-test"})
} }
okExit("everything compiled")
/*
all := me.forge.Repos.SortByFullPath() all := me.forge.Repos.SortByFullPath()
for all.Scan() { for all.Scan() {
check := all.Next() check := all.Next()
@ -246,21 +264,7 @@ func main() {
// shell.Run([]string{"forge", "--find-private"}) // shell.Run([]string{"forge", "--find-private"})
badExit(errors.New("some repos failed")) badExit(errors.New("some repos failed"))
} }
if argv.Test { */
homeDir, _ := os.UserHomeDir()
testdir := filepath.Join(homeDir, "go/src/go.wit.com/apps/utils/wit-utils/go-clone-test/")
os.Chdir(testdir)
shell.RunRealtime([]string{"go", "install"})
workdir := filepath.Join(homeDir, "gowork")
if err := os.MkdirAll(workdir, os.ModePerm); err != nil {
badExit(err)
}
os.Chdir(workdir)
shell.RunRealtime([]string{"go-clone-test"})
}
okExit("everything compiled")
} }
// this is dumb. sync this with go-deb // this is dumb. sync this with go-deb