new autogenpb

This commit is contained in:
Jeff Carr 2025-02-20 09:39:31 -06:00
parent e86ac8c728
commit ee49338376
3 changed files with 36 additions and 6 deletions

View File

@ -42,10 +42,10 @@ debian-release-force: install
rm -f ~/go/lib/go-gui/*
forge --install go.wit.com/apps/go-deb
go-deb -h # check to make sure go-deb builds
-wit-test debian --force --verbose --release
wit-test debian --force --verbose --release
ls -hl ~/incoming/
dpkg-deb -c ~/incoming/go-gui-toolkits*.deb
do-aptly
old-debian-force: install
wit-test debian --force --verbose
debian-release-build-only: install
wit-test debian --verbose --release

View File

@ -52,6 +52,7 @@ func buildDeb() {
if argv.Verbose {
log.Info("build cmd:", cmd)
cmd = append(cmd, "--verbose")
}
if argv.DryRun {
continue

35
main.go
View File

@ -4,18 +4,18 @@
package main
import (
"debug/buildinfo"
"fmt"
"os"
"path/filepath"
"unicode"
"go.wit.com/dev/alexflint/arg"
"go.wit.com/lib/gui/shell"
"go.wit.com/log"
"go.wit.com/gui"
"go.wit.com/lib/gui/shell"
"go.wit.com/lib/protobuf/forgepb"
"go.wit.com/lib/protobuf/gitpb"
"go.wit.com/log"
)
// sent via -ldflags
@ -38,6 +38,7 @@ func main() {
argv.doBashAuto()
os.Exit(0)
}
dumpDebug()
failed = make(map[*gitpb.Repo]string)
state = make(map[*gitpb.Repo]string)
@ -289,3 +290,31 @@ func badExit(err error) {
log.Info("go-clean failed: ", err, me.forge.GetGoSrc())
os.Exit(-1)
}
func dumpDebug() {
// Get absolute path of the currently running binary
exePath, err := os.Executable()
if err != nil {
fmt.Println("Error getting executable path:", err)
return
}
// Resolve symlinks if necessary
exePath, err = filepath.EvalSymlinks(exePath)
if err != nil {
fmt.Println("Error resolving symlink:", err)
return
}
// Read build info
bi, err := buildinfo.ReadFile(exePath)
if err != nil {
fmt.Println("Error reading build info:", err)
return
}
fmt.Println("Go Version:", bi.GoVersion)
for _, dep := range bi.Deps {
fmt.Printf("Dependency: %s %s\n", dep.Path, dep.Version)
}
}