summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--doRepos.go19
-rw-r--r--main.go9
3 files changed, 28 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index d9ddf76..b391c8c 100644
--- a/Makefile
+++ b/Makefile
@@ -5,7 +5,7 @@ VERSION = $(shell git describe --tags)
BUILDTIME = $(shell date +%s)
all: build
- FORGE_VERBOSE=true ./forged clean
+ FORGE_VERBOSE=true ./forged patches list
# FORGE_VERBOSE=true ./forged list
build: goimports
diff --git a/doRepos.go b/doRepos.go
new file mode 100644
index 0000000..c6fece8
--- /dev/null
+++ b/doRepos.go
@@ -0,0 +1,19 @@
+package main
+
+import (
+ "go.wit.com/log"
+)
+
+func doRepos() error {
+ if argv.Repos.List != nil {
+ return doReposList()
+ }
+
+ return doReposList()
+}
+
+func doReposList() error {
+ log.Infof("Repos.Len()=%d\n", me.forge.Repos.Len())
+ // me.forge.Repos.PrintTable()
+ return nil
+}
diff --git a/main.go b/main.go
index ac905b3..48d132c 100644
--- a/main.go
+++ b/main.go
@@ -36,7 +36,14 @@ func main() {
}
if argv.Patch != nil {
- if err := doPatches(); err == nil {
+ if err := doPatches(); err != nil {
+ badExit(err)
+ }
+ okExit("")
+ }
+
+ if argv.Repos != nil {
+ if err := doRepos(); err != nil {
badExit(err)
}
okExit("")