wrong paths
This commit is contained in:
parent
cf2f07f273
commit
1970e40d0b
9
Makefile
9
Makefile
|
@ -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
|
||||
|
|
47
argv.go
47
argv.go
|
@ -6,35 +6,30 @@ 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 {
|
||||
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"`
|
||||
OutDir string `arg:"--dir" help:"write .deb file into this directory"`
|
||||
Release bool `arg:"--release" help:"build a release from the last git tag"`
|
||||
KeepFiles bool `arg:"--keep-files" help:"keep the build files/"`
|
||||
Force bool `arg:"--force" default:"false" help:"force overwrite an existing .deb file"`
|
||||
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")
|
||||
}
|
||||
*/
|
||||
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"`
|
||||
OutDir string `arg:"--dir" help:"write .deb file into this directory"`
|
||||
Release bool `arg:"--release" help:"build a release from the last git tag"`
|
||||
KeepFiles bool `arg:"--keep-files" help:"keep the build files/"`
|
||||
Force bool `arg:"--force" default:"false" help:"force overwrite an existing .deb file"`
|
||||
Verbose bool `arg:"--verbose" help:"show more things"`
|
||||
}
|
||||
|
||||
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`
|
||||
}
|
||||
|
|
|
@ -70,10 +70,10 @@ func (c *controlBox) buildPackage() (bool, error) {
|
|||
}
|
||||
|
||||
/*
|
||||
forgecmd := "forge"
|
||||
if argv.Forge == "go.wit.com/apps/forge" {
|
||||
forgecmd = "last.forge"
|
||||
}
|
||||
forgecmd := "forge"
|
||||
if argv.Forge == "go.wit.com/apps/forge" {
|
||||
forgecmd = "last.forge"
|
||||
}
|
||||
*/
|
||||
|
||||
if argv.Release {
|
||||
|
@ -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)
|
||||
|
|
6
main.go
6
main.go
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue