summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-05 17:25:15 -0500
committerJeff Carr <[email protected]>2025-10-05 17:25:15 -0500
commitc5796d45570ca3b6d0132cbfa3faabacc070aa13 (patch)
tree1a90707034a28fcbc58755c101e8e251cb51209b
parentf09240a122f09f297d96332c431db74857b93e6f (diff)
start working on not killing autogen files
-rw-r--r--argv.go7
-rw-r--r--doGit.go4
-rw-r--r--doPublish.go3
3 files changed, 12 insertions, 2 deletions
diff --git a/argv.go b/argv.go
index f4e3d3d..44ea8f9 100644
--- a/argv.go
+++ b/argv.go
@@ -28,7 +28,7 @@ type args struct {
Rdate *EmptyCmd `arg:"subcommand:rdate" help:"standard rdate"`
Zoo *EmptyCmd `arg:"subcommand:zoo" help:"WIT Private Cloud info"`
Upgrade *UpgradeCmd `arg:"subcommand:upgrade" help:"apt upgrade packages installed from mirrors.wit.com"`
- Publish *EmptyCmd `arg:"subcommand:publish" help:"publish packages"`
+ Publish *PublishCmd `arg:"subcommand:publish" help:"publish packages"`
RepoMap string `arg:"--repomap" help:"location of the repomap"`
DryRun bool `arg:"--dry-run" help:"only show what would be packaged"`
Install bool `arg:"--install" help:"go install the binaries first"`
@@ -68,6 +68,11 @@ type UpgradeCmd struct {
Force bool `arg:"--force" help:"force un-install and re-install each package"`
}
+type PublishCmd struct {
+ All bool `arg:"--all" help:"show all the packages"`
+ Gomod bool `arg:"--keep-gomod" help:"don't really do anything"`
+}
+
type DefaultCmd struct {
DryRun bool `arg:"--dry-run" help:"show what has not yet come to pass"`
Verbose bool `arg:"--verbose" help:"be loud about it"`
diff --git a/doGit.go b/doGit.go
index a886a3b..6ef6f96 100644
--- a/doGit.go
+++ b/doGit.go
@@ -84,7 +84,9 @@ func doPull(wpath string) {
return
}
os.Chdir(repo.FullPath)
- exitOnErrorRealtime([]string{"git", "pull"})
+ cmd := []string{"git", "pull"}
+ log.Info("Run", repo.FullPath, cmd)
+ exitOnErrorRealtime(cmd)
}
func doPush(wpath string) {
diff --git a/doPublish.go b/doPublish.go
index b5c264d..114c23b 100644
--- a/doPublish.go
+++ b/doPublish.go
@@ -54,6 +54,9 @@ func doPublish() error {
}
cmd = []string{"guireleaser", "--gui", "andlabs", "--auto-run", "quick"}
+ if argv.Publish.Gomod {
+ cmd = append(cmd, "--keep-gomod")
+ }
if _, err := shell.RunRealtimeError(cmd); err != nil {
log.Info("releaser failed", err)
me.sh.BadExit("publishing failed", nil)