Daemon: Add flag to force PolyGerrit development mode
Frontend developers shouldn't even have to open Eclipse in order to get started developing PolyGerrit: Eclipse is far from the most popular frontend development environment, and setting it up for the first time is an unnecessary barrier. Add a flag --polygerrit-dev to the daemon command that does two things: 1. Act as if gerrit.enablePolyGerrit is set to true, enabling the PolyGerrit UI. 2. Serve PolyGerrit from the local buck-out directory, as if it were launched from Eclipse, ignoring the version compiled into the war. Change-Id: Ibfe92d3d53637c5c8424e3200791f28260c0c9fa
This commit is contained in:
@@ -142,6 +142,9 @@ public class Daemon extends SiteProgram {
|
||||
@Option(name = "--headless", usage = "Don't start the UI frontend")
|
||||
private boolean headless;
|
||||
|
||||
@Option(name = "--polygerrit-dev", usage = "Force PolyGerrit UI for development")
|
||||
private boolean polyGerritDev;
|
||||
|
||||
@Option(name = "--init", aliases = {"-i"},
|
||||
usage = "Init site before starting the daemon")
|
||||
private boolean doInit;
|
||||
@@ -370,8 +373,8 @@ public class Daemon extends SiteProgram {
|
||||
modules.add(new AbstractModule() {
|
||||
@Override
|
||||
protected void configure() {
|
||||
bind(GerritOptions.class)
|
||||
.toInstance(new GerritOptions(config, headless, slave));
|
||||
bind(GerritOptions.class).toInstance(
|
||||
new GerritOptions(config, headless, slave, polyGerritDev));
|
||||
if (test) {
|
||||
bind(String.class).annotatedWith(SecureStoreClassName.class)
|
||||
.toInstance(DefaultSecureStore.class.getName());
|
||||
|
||||
Reference in New Issue
Block a user