diff options
| author | Jeff Carr <[email protected]> | 2024-12-16 01:08:56 -0600 | 
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-12-16 01:08:56 -0600 | 
| commit | 2141737e7c1efac1fe0cd929e4da5ad18397b43c (patch) | |
| tree | 9e9732cd2aa35eec7c633bd3008001845745a5e4 | |
| parent | 4f27202bce4234be472347b95408ea436a8d0432 (diff) | |
actually implement --dirv0.22.40
| -rw-r--r-- | README.md | 2 | ||||
| -rw-r--r-- | argv.go | 2 | ||||
| -rw-r--r-- | buildPackage.go | 7 | ||||
| -rw-r--r-- | control | 4 | 
4 files changed, 10 insertions, 5 deletions
@@ -2,7 +2,7 @@  Makes a debian package from a go git repository, but also arbitrary things. -# Usage (puts the finished .deb file in ~/incoming/) : +# Usage  * go-deb --auto --repo go.wit.com/apps/go-clone # just make the .deb file already  * go-deb ---repo go.wit.com/apps/go-clone  # will try to open a gtk gui @@ -18,7 +18,7 @@ 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"`  	Repo      string   `arg:"--repo"                   help:"go get path to the repo"` -	PkgDir    string   `arg:"--pkg-dir"                help:"set default directory (~/incoming/)"` +	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"` diff --git a/buildPackage.go b/buildPackage.go index 17f8ffd..d717854 100644 --- a/buildPackage.go +++ b/buildPackage.go @@ -39,7 +39,12 @@ func (c *controlBox) buildPackage() (bool, error) {  	version := c.Version.String()  	log.Info("version is:", version)  	debname := filename + "_" + version + "_" + arch + ".deb" -	fulldebname := filepath.Join(homeDir, "incoming", debname) +	var fulldebname string +	if argv.OutDir == "" { +		fulldebname = debname +	} else { +		fulldebname = filepath.Join(argv.OutDir, debname) +	}  	if shell.Exists(fulldebname) {  		log.Info("debian package already built: " + fulldebname)  		if argv.Auto { @@ -4,9 +4,9 @@ Package: go-deb  Maintainer: Jeff Carr <[email protected]>  Packager: Jeff Carr <[email protected]>  Architecture: amd64 -Depends: +Depends: go-gui-toolkits  URL: https://go.wit.com/ -Recommends: go-gui-toolkits +Recommends:  Conflicts: testingoldstuff  Description: create distribution packages for golang repositories   Hopefully, this can make compatible and correct source  | 
