diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2019-10-15 13:20:14 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2019-10-21 09:33:37 +0200 |
commit | ba478d20d4b9595cf3d8252bd25f8e758d2137c7 (patch) | |
tree | 8a9a16546780c05581f071d363695a1a8e1dc6ca /src | |
parent | 2306021655503728f7e94fdf058e521c6151647d (diff) |
Add an option to reset the module update state
This is useful when finding bugs in the updater and wanting to start from scratch
Change-Id: I7d17d09f9dfd75d78c8f816ab0e5505ab20ba9a6
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Aapo Keskimolo <aapo.keskimolo@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/qtmoduleupdater/main.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/qtmoduleupdater/main.go b/src/qtmoduleupdater/main.go index b1058505..41fa4b7a 100644 --- a/src/qtmoduleupdater/main.go +++ b/src/qtmoduleupdater/main.go @@ -69,6 +69,8 @@ func appMain() error { flag.BoolVar(&summaryOnly, "summarize", false /*default*/, "") verbose := false flag.BoolVar(&verbose, "verbose", false /*default*/, "Enable verbose logging output") + reset := false + flag.BoolVar(&reset, "reset", false, "Reset the batch update state") autorun := false flag.BoolVar(&autorun, "autorun", false, "Run automatically by reading settings from autorun.json") flag.Parse() @@ -115,6 +117,11 @@ func appMain() error { return nil } + if reset { + batch.clearStateCommit(gerrit) + return nil + } + return batch.runOneIteration(gerrit) } |