summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile8
-rw-r--r--doPatch.go15
-rw-r--r--structs.go5
3 files changed, 16 insertions, 12 deletions
diff --git a/Makefile b/Makefile
index 0967148..42c6c4b 100644
--- a/Makefile
+++ b/Makefile
@@ -64,21 +64,19 @@ devel:
forge clean devel --force --verbose
pull: install
- # 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
# cloudflare blocks POST due to captcha checks / human detection?
# POST must be direct socket. probably for the best anyway
submit:
FORGE_URL="https://forge.grid.wit.com/" forge patch submit "forge auto commit"
- # forge patch --submit "forge auto commit"
commit:
FORGE_URL="https://forge.grid.wit.com/" forge commit --all
+check: install
+ FORGE_URL="https://forge.grid.wit.com/" forge patch check
+
doc:
echo "/*" > doc.go
forge -h >> doc.go
diff --git a/doPatch.go b/doPatch.go
index b6cf0dd..cbf1f31 100644
--- a/doPatch.go
+++ b/doPatch.go
@@ -36,19 +36,20 @@ func doPatch() error {
log.Info("Get Patchsets Failed", err)
return err
}
+ return nil
+ }
+ if argv.Patch.Check != nil {
old := findExpired()
// old.PrintTable()
for p := range old.IterAll() {
log.Info("patch", p.Filename, p.Namespace)
}
- me.forge.SubmitPatchesNew(old, "oldpatchset")
- log.Infof("submitted %d old patches\n", old.Len())
- return nil
- }
-
- if argv.Patch.Check != nil {
- log.Info("remove this option")
+ newpb, err := old.HttpPostVerbose(myServer(), "check")
+ if err != nil {
+ return err
+ }
+ newpb.PrintTable()
return nil
}
diff --git a/structs.go b/structs.go
index 1d4a1f4..6a25fc1 100644
--- a/structs.go
+++ b/structs.go
@@ -20,6 +20,11 @@ func (b *mainType) Enable() {
b.mainbox.Enable()
}
+// returns the server to connect to
+func myServer() string {
+ return me.forge.GetForgeURL()
+}
+
// this app's variables
type mainType struct {
pp *arg.Parser // for parsing the command line args. Yay to alexf lint!