wrong paths

This commit is contained in:
Jeff Carr 2025-02-22 07:35:37 -06:00
parent cf2f07f273
commit 1970e40d0b
4 changed files with 37 additions and 35 deletions

View File

@ -3,11 +3,11 @@
VERSION = $(shell git describe --tags)
DATE = $(shell date +%Y.%m.%d)
run: install
go-deb --release --no-gui --auto --forge go.wit.com/apps/autogenpb --dir ${HOME}/incoming
go-deb --release --no-gui --auto --forge go.wit.com/apps/go-mod-clean --dir ${HOME}/incoming
run: clean goimports vet install
go-deb --release --no-gui --auto --forge go.wit.com/apps/autogenpb --dir /tmp/
go-deb --release --no-gui --auto --forge go.wit.com/apps/go-mod-clean --dir /tmp/
@#go-deb --forge go.wit.com/apps/autotypist --no-gui --auto
ls -lth ${HOME}/incoming
ls -lth /tmp/*deb
vet:
@GO111MODULE=off go vet
@ -47,6 +47,7 @@ nocui: reset build
./go-deb --gui nocui
clean:
rm -f go.*
rm -f go-deb
rm -f resources/*.so
touch resources/blank.so

31
argv.go
View File

@ -6,13 +6,8 @@ package main
this enables command line options from other packages like 'gui' and 'log'
*/
import (
"go.wit.com/dev/alexflint/arg"
)
var argv args
type args struct {
Commit *EmptyCmd `arg:"subcommand:commit" help:"'git commit' but errors out if on wrong branch"`
Auto bool `arg:"--auto" help:"automatically attempt to make the .deb"`
Ldflags []string `arg:"--ldflags" help:"flags to pass to go build"`
Forge string `arg:"--forge" help:"use a git repo from forge"`
@ -23,18 +18,18 @@ type args struct {
Verbose bool `arg:"--verbose" help:"show more things"`
}
func init() {
arg.MustParse(&argv)
/*
if debugger.ArgDebug() {
log.Info("cmd line --debugger == true")
} else {
log.Info("cmd line --debugger == false")
}
*/
}
func (args) Version() string {
return "go-clone " + VERSION + " Built on " + DATE
}
type EmptyCmd struct {
}
func (a args) Description() string {
return `
Example usage:
guireleaser go.wit.com/apps/go-clone --increment --release --dry-run --reason "blerg"
This will pull down the go sources and
the repositories in the go.sum file using git clone`
}

View File

@ -85,7 +85,7 @@ func (c *controlBox) buildPackage() (bool, error) {
cmd = append(cmd, "-v")
cmd = append(cmd, "-x")
}
cmd = append(cmd, argv.Forge + "@v" + version)
cmd = append(cmd, argv.Forge+"@v"+version)
if err := shell.PathExecVerbose("", cmd); err != nil {
badExit(err)
return false, fmt.Errorf("go build err %v", err)

View File

@ -5,6 +5,7 @@ import (
"os"
"path/filepath"
"go.wit.com/dev/alexflint/arg"
"go.wit.com/gui"
"go.wit.com/lib/fhelp"
"go.wit.com/lib/gui/shell"
@ -19,9 +20,14 @@ var DATE string
//go:embed resources/*
var resources embed.FS
var argv args
func main() {
me = new(mainType)
gui.InitArg()
arg.MustParse(&argv)
goSrc, hasWork, err := fhelp.DetermineGoPath()
if err != nil {
badExit(err)