try to push patchsets

This commit is contained in:
Jeff Carr 2024-12-25 23:17:24 -06:00
parent 4ec714a678
commit bdaa40c51f
3 changed files with 40 additions and 49 deletions

View File

@ -65,16 +65,16 @@ all: install
forge --no-gui find --all forge --no-gui find --all
patches: install patches: install
forge --do-patches forge --patchset "from makefile"
patches-localhost: install localhost-patches: install
forge --do-patches --url "http://localhost:2233/" forge --patchset "test-localhost" --url "http://localhost:2233/"
patches-list: install patches-list: install
forge --list-patches --url "http://localhost:2233/" forge --list-patchset
dirty: install dirty: install
forge do --dirty forge --no-gui find --all --dirty
restart: restart:
reset reset

25
argv.go
View File

@ -14,19 +14,8 @@ type FindCmd struct {
Private bool `arg:"--private" help:"private repos from your .config/forge/"` Private bool `arg:"--private" help:"private repos from your .config/forge/"`
} }
type DoCmd struct {
List bool `arg:"--list" help:"just show a table of the current state"`
GitPull bool `arg:"--pull" help:"run 'git pull'"`
GitReset bool `arg:"--git-reset" help:"run 'git reset --hard'"`
Scan bool `arg:"--scan" help:"reload protobuf from .git/"`
Force bool `arg:"--force" help:"force redo things"`
Dirty bool `arg:"--dirty" help:"update git CheckDirty()"`
PatchSet string `arg:"--patchset" help:"make patch set"`
}
type args struct { type args struct {
Find *FindCmd `arg:"subcommand:find" help:"select repos (for example, --all or --mine)"` Find *FindCmd `arg:"subcommand:find" help:"select repos (for example, --all or --mine)"`
Do *DoCmd `arg:"subcommand:do" help:"do something ('git pull', 'build', 'install', etc)"`
Config bool `arg:"--config" help:"show your .config/forge/ settings"` Config bool `arg:"--config" help:"show your .config/forge/ settings"`
ListPatchSet bool `arg:"--list-patchset" help:"list patch sets"` ListPatchSet bool `arg:"--list-patchset" help:"list patch sets"`
DryRun bool `arg:"--dry-run" help:"show what would be run"` DryRun bool `arg:"--dry-run" help:"show what would be run"`
@ -37,6 +26,13 @@ type args struct {
Master bool `arg:"--master" help:"git checkout master"` Master bool `arg:"--master" help:"git checkout master"`
URL string `arg:"--connect" help:"gowebd url"` URL string `arg:"--connect" help:"gowebd url"`
Register string `arg:"--register" help:"register your git URL (foo.com/mystuff) or (github.com/foo/bar)"` Register string `arg:"--register" help:"register your git URL (foo.com/mystuff) or (github.com/foo/bar)"`
List bool `arg:"--list" help:"just show a table of the current state"`
GitPull bool `arg:"--pull" help:"run 'git pull'"`
GitReset bool `arg:"--git-reset" help:"run 'git reset --hard'"`
Scan bool `arg:"--scan" help:"reload protobuf from .git/"`
Force bool `arg:"--force" help:"force redo things"`
Dirty bool `arg:"--dirty" help:"update git CheckDirty()"`
PatchSet string `arg:"--patchset" help:"make patch set"`
} }
func (args) Version() string { func (args) Version() string {
@ -49,13 +45,10 @@ forge -- in the spirit of things like sourceforge
Examples: Examples:
forge --config # shows your forge config (~/.config/forge/) forge --config # shows your forge config (~/.config/forge/)
forge find --all do --pull # run 'git pull' in every repo forge find --all --pull # run 'git pull' in every repo
forge find --mine do --clone # git clone every package you have in your config file forge find --mine --user # checkout the user branch
forge find --all do --build --dry-run # build every binary package (but just show what would run)
forge find --all --user # checkout the user branch
forge find --all --devel # checkout the devel branch forge find --all --devel # checkout the devel branch
forge find --all --master # checkout the master branch forge find --all --master # checkout the master branch
# these options are intended for automation. You probably just want to use the GUI.
` `
} }

54
main.go
View File

@ -84,38 +84,36 @@ func main() {
// now, do something to all of them (or just print out a table of them) // now, do something to all of them (or just print out a table of them)
var done bool = false var done bool = false
if argv.Do != nil { if argv.Dirty {
if argv.Do.Dirty { doCheckDirty()
doCheckDirty() okExit("")
okExit("") done = true
done = true }
}
if argv.Do.Scan { if argv.Scan {
doScan() doScan()
done = true done = true
} }
if argv.Do.GitPull { if argv.GitPull {
doGitPull() doGitPull()
done = true done = true
} }
if argv.Do.GitReset { if argv.GitReset {
doGitReset() doGitReset()
done = true done = true
} }
if argv.Do.List { if argv.List {
// print out the repos // print out the repos
doCobol() doCobol()
done = true done = true
} }
if argv.Do.PatchSet != "" { if argv.PatchSet != "" {
sendDevelDiff(argv.Do.PatchSet) sendDevelDiff(argv.PatchSet)
// sendMasterDiff() // sendMasterDiff()
okExit("patches") okExit("patches")
}
} }
if argv.ListPatchSet { if argv.ListPatchSet {