add --delete
This commit is contained in:
parent
05208620a6
commit
4e299a8ca0
13
Makefile
13
Makefile
|
@ -1,11 +1,12 @@
|
||||||
VERSION = $(shell git describe --tags)
|
VERSION = $(shell git describe --tags)
|
||||||
BUILDTIME = $(shell date +%Y.%m.%d)
|
BUILDTIME = $(shell date +%Y.%m.%d)
|
||||||
|
|
||||||
all: install
|
all:
|
||||||
@echo make restart # remove the repos.pb file
|
make private
|
||||||
@echo make private # only the private ones
|
@echo "make restart # remove the repos.pb file"
|
||||||
@echo make mine # just show my repos
|
@echo "make private # only the private ones"
|
||||||
@echo make pull # run git pull on every repo
|
@echo "make mine # just show my repos"
|
||||||
|
@echo "make pull # run git pull on every repo"
|
||||||
|
|
||||||
vet:
|
vet:
|
||||||
@GO111MODULE=off go vet
|
@GO111MODULE=off go vet
|
||||||
|
@ -40,7 +41,7 @@ private: install
|
||||||
fix: install
|
fix: install
|
||||||
forge --fix --find-all
|
forge --fix --find-all
|
||||||
|
|
||||||
all: install
|
list-all: install
|
||||||
forge --find-all
|
forge --find-all
|
||||||
|
|
||||||
git-reset: install
|
git-reset: install
|
||||||
|
|
1
argv.go
1
argv.go
|
@ -28,6 +28,7 @@ type args struct {
|
||||||
DryRun bool `arg:"--dry-run" help:"show what would be run"`
|
DryRun bool `arg:"--dry-run" help:"show what would be run"`
|
||||||
Fix bool `arg:"--fix" help:"fix config, save config & exit"`
|
Fix bool `arg:"--fix" help:"fix config, save config & exit"`
|
||||||
URL string `arg:"--url" default:"http://go.wit.com/" help:"base url"`
|
URL string `arg:"--url" default:"http://go.wit.com/" help:"base url"`
|
||||||
|
Delete string `arg:"--delete" help:"delete this repo"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (args) Version() string {
|
func (args) Version() string {
|
||||||
|
|
6
main.go
6
main.go
|
@ -42,6 +42,12 @@ func main() {
|
||||||
configSave = false
|
configSave = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if argv.Delete != "" {
|
||||||
|
me.forge.DeleteByGoPath(argv.Delete)
|
||||||
|
me.forge.SetConfigSave(true)
|
||||||
|
okExit("")
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
// var count int
|
// var count int
|
||||||
all := me.forge.Repos.SortByFullPath()
|
all := me.forge.Repos.SortByFullPath()
|
||||||
|
|
Loading…
Reference in New Issue