wrong paths
This commit is contained in:
parent
cf2f07f273
commit
1970e40d0b
9
Makefile
9
Makefile
|
@ -3,11 +3,11 @@
|
||||||
VERSION = $(shell git describe --tags)
|
VERSION = $(shell git describe --tags)
|
||||||
DATE = $(shell date +%Y.%m.%d)
|
DATE = $(shell date +%Y.%m.%d)
|
||||||
|
|
||||||
run: install
|
run: clean goimports vet 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/autogenpb --dir /tmp/
|
||||||
go-deb --release --no-gui --auto --forge go.wit.com/apps/go-mod-clean --dir ${HOME}/incoming
|
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
|
@#go-deb --forge go.wit.com/apps/autotypist --no-gui --auto
|
||||||
ls -lth ${HOME}/incoming
|
ls -lth /tmp/*deb
|
||||||
|
|
||||||
vet:
|
vet:
|
||||||
@GO111MODULE=off go vet
|
@GO111MODULE=off go vet
|
||||||
|
@ -47,6 +47,7 @@ nocui: reset build
|
||||||
./go-deb --gui nocui
|
./go-deb --gui nocui
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
rm -f go.*
|
||||||
rm -f go-deb
|
rm -f go-deb
|
||||||
rm -f resources/*.so
|
rm -f resources/*.so
|
||||||
touch resources/blank.so
|
touch resources/blank.so
|
||||||
|
|
31
argv.go
31
argv.go
|
@ -6,13 +6,8 @@ package main
|
||||||
this enables command line options from other packages like 'gui' and 'log'
|
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 {
|
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"`
|
Auto bool `arg:"--auto" help:"automatically attempt to make the .deb"`
|
||||||
Ldflags []string `arg:"--ldflags" help:"flags to pass to go build"`
|
Ldflags []string `arg:"--ldflags" help:"flags to pass to go build"`
|
||||||
Forge string `arg:"--forge" help:"use a git repo from forge"`
|
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"`
|
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 {
|
func (args) Version() string {
|
||||||
return "go-clone " + VERSION + " Built on " + DATE
|
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`
|
||||||
|
}
|
||||||
|
|
|
@ -85,7 +85,7 @@ func (c *controlBox) buildPackage() (bool, error) {
|
||||||
cmd = append(cmd, "-v")
|
cmd = append(cmd, "-v")
|
||||||
cmd = append(cmd, "-x")
|
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 {
|
if err := shell.PathExecVerbose("", cmd); err != nil {
|
||||||
badExit(err)
|
badExit(err)
|
||||||
return false, fmt.Errorf("go build err %v", err)
|
return false, fmt.Errorf("go build err %v", err)
|
||||||
|
|
6
main.go
6
main.go
|
@ -5,6 +5,7 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
|
"go.wit.com/dev/alexflint/arg"
|
||||||
"go.wit.com/gui"
|
"go.wit.com/gui"
|
||||||
"go.wit.com/lib/fhelp"
|
"go.wit.com/lib/fhelp"
|
||||||
"go.wit.com/lib/gui/shell"
|
"go.wit.com/lib/gui/shell"
|
||||||
|
@ -19,9 +20,14 @@ var DATE string
|
||||||
//go:embed resources/*
|
//go:embed resources/*
|
||||||
var resources embed.FS
|
var resources embed.FS
|
||||||
|
|
||||||
|
var argv args
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
me = new(mainType)
|
me = new(mainType)
|
||||||
|
|
||||||
|
gui.InitArg()
|
||||||
|
arg.MustParse(&argv)
|
||||||
|
|
||||||
goSrc, hasWork, err := fhelp.DetermineGoPath()
|
goSrc, hasWork, err := fhelp.DetermineGoPath()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
badExit(err)
|
badExit(err)
|
||||||
|
|
Loading…
Reference in New Issue