summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-08-16 18:58:52 -0500
committerJeff Carr <[email protected]>2025-08-16 18:58:52 -0500
commit2bd007d0c054cedbdea14f743aa03bb46015d6c5 (patch)
treebfd79027be226571e1d9a139315599c52633b52a
parenta21d17dda963eec946ca5f2e40d2a8a9aee9e009 (diff)
stub in something to check the versions
-rw-r--r--Makefile6
-rw-r--r--argv.go2
-rw-r--r--doPull.go12
3 files changed, 17 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index af066b4..4e29077 100644
--- a/Makefile
+++ b/Makefile
@@ -59,6 +59,8 @@ devel:
forge clean devel --force --verbose
pull: install
- forge pull dirty
- FORGE_URL="https://forge.grid.wit.com/" forge pull
+ # forge pull dirty
+ # FORGE_URL="https://forge.grid.wit.com/" forge pull dirty
+ # FORGE_URL="https://forge.grid.wit.com/" forge pull patches
+ FORGE_URL="https://forge.grid.wit.com/" forge pull check
# forge pull patches
diff --git a/argv.go b/argv.go
index be61247..9b7601b 100644
--- a/argv.go
+++ b/argv.go
@@ -68,7 +68,7 @@ type PatchCmd struct {
}
type PullCmd struct {
- Test *EmptyCmd `arg:"subcommand:test" help:"list repos that need 'git pull'"`
+ Check *EmptyCmd `arg:"subcommand:check" help:"check repo versions"`
Dirty *EmptyCmd `arg:"subcommand:dirty" help:"only check dirty repos"`
Patches *EmptyCmd `arg:"subcommand:patches" help:"only check repos with patches"`
Sync *SyncCmd `arg:"subcommand:sync" help:"sync repos with upstream"`
diff --git a/doPull.go b/doPull.go
index adc83f3..d174d24 100644
--- a/doPull.go
+++ b/doPull.go
@@ -71,6 +71,13 @@ func doGitPullNew() error {
check = findReposWithPatches()
}
+ if argv.Pull.Check != nil {
+ // TODO: never wrote this yet
+ // update, err := me.forge.CheckVersions()
+ // return err
+ return nil
+ }
+
if check.Len() == 0 {
// check = doFind()
check = findAll()
@@ -79,6 +86,11 @@ func doGitPullNew() error {
}
me.forge.PrintHumanTableFull(check)
+ if argv.Pull.Dirty != nil {
+ log.Info("dirty count =", check.Len())
+ return nil
+ }
+
found, err := me.forge.LookupPB(check)
if err != nil {
log.Info("LookupPB() failed", err, "len(check)=", check.Len())