summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-12-16 01:08:56 -0600
committerJeff Carr <[email protected]>2024-12-16 01:08:56 -0600
commit2141737e7c1efac1fe0cd929e4da5ad18397b43c (patch)
tree9e9732cd2aa35eec7c633bd3008001845745a5e4
parent4f27202bce4234be472347b95408ea436a8d0432 (diff)
actually implement --dirv0.22.40
-rw-r--r--README.md2
-rw-r--r--argv.go2
-rw-r--r--buildPackage.go7
-rw-r--r--control4
4 files changed, 10 insertions, 5 deletions
diff --git a/README.md b/README.md
index 52916ff..ddb8413 100644
--- a/README.md
+++ b/README.md
@@ -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
diff --git a/argv.go b/argv.go
index dab16cc..1ceb6cc 100644
--- a/argv.go
+++ b/argv.go
@@ -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 {
diff --git a/control b/control
index ad3cb25..0ff619e 100644
--- a/control
+++ b/control
@@ -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