|
@@ -42,36 +42,54 @@ public class CodeCommand extends AbstractCommand {
|
|
|
|
|
|
private static final LoggerProgressMonitor LOGGER_PROGRESS_MONITOR = new LoggerProgressMonitor(LOG);
|
|
|
|
|
|
- @Option(names = "--core-repository", defaultValue = "https://bitbucket.org/l2jserver/l2j_server.git", description = "Core repository")
|
|
|
- private String coreRepository = "https://bitbucket.org/l2jserver/l2j_server.git";
|
|
|
+ private static final String DEFAULT_LOGIN_REPO = "https://bitbucket.org/l2jserver/l2j-server-login.git";
|
|
|
+ private static final String DEFAULT_GAME_REPO = "https://bitbucket.org/l2jserver/l2j-server-game.git";
|
|
|
+ private static final String DEFAULT_DATAPACK_REPO = "https://bitbucket.org/l2jserver/l2j-server-datapack.git";
|
|
|
|
|
|
- @Option(names = "--datapack-repository", defaultValue = "https://bitbucket.org/l2jserver/l2j_server.git", description = "Core repository")
|
|
|
- private String datapackRepository = "https://bitbucket.org/l2jserver/l2j_datapack.git";
|
|
|
+ private static final String DEFAULT_LOGIN_DIR = "./l2j/git/l2j-server-login";
|
|
|
+ private static final String DEFAULT_GAME_DIR = "./l2j/git/l2j-server-game";
|
|
|
+ private static final String DEFAULT_DATAPACK_DIR = "./l2j/git/l2j-server-datapack";
|
|
|
|
|
|
- @Option(names = "--core-directory", defaultValue = "/l2j/git/l2j_server", description = "Core directory")
|
|
|
- private File coreDirectory = new File("/l2j/git/l2j_server");
|
|
|
+ @Option(names = "--login-repository", defaultValue = DEFAULT_LOGIN_REPO, description = "Login repository")
|
|
|
+ private String loginRepository = DEFAULT_LOGIN_REPO;
|
|
|
+ @Option(names = "--game-repository", defaultValue = DEFAULT_GAME_REPO, description = "Game repository")
|
|
|
+ private String gameRepository = DEFAULT_GAME_REPO;
|
|
|
+ @Option(names = "--datapack-repository", defaultValue = DEFAULT_DATAPACK_REPO, description = "Datapack repository")
|
|
|
+ private String datapackRepository = DEFAULT_DATAPACK_REPO;
|
|
|
|
|
|
- @Option(names = "--datapack-directory", defaultValue = "/l2j/git/l2j_datapack", description = "DataPack directory")
|
|
|
+ @Option(names = "--login-directory", defaultValue = DEFAULT_LOGIN_DIR, description = "Login directory")
|
|
|
+ private File loginDirectory = new File(DEFAULT_LOGIN_DIR);
|
|
|
+ @Option(names = "--game-directory", defaultValue = DEFAULT_GAME_DIR, description = "Game directory")
|
|
|
+ private File gameDirectory = new File(DEFAULT_GAME_DIR);
|
|
|
+ @Option(names = "--datapack-directory", defaultValue = DEFAULT_DATAPACK_DIR, description = "DataPack directory")
|
|
|
private File datapackDirectory = new File("/l2j/git/l2j_datapack");
|
|
|
|
|
|
- @Option(names = "--clone", defaultValue = "BOTH", description = "Clone BOTH|CORE|DATAPACK")
|
|
|
- private CloneType cloneType = CloneType.BOTH;
|
|
|
+ @Option(names = "--clone", defaultValue = "ALL", description = "Clone ALL|LOGIN|GAME|DATAPACK")
|
|
|
+ private CloneType cloneType = CloneType.ALL;
|
|
|
|
|
|
@Override
|
|
|
public void run() {
|
|
|
try {
|
|
|
switch (cloneType) {
|
|
|
- case BOTH: {
|
|
|
- LOG.info("Cloning L2J Server");
|
|
|
- cloneRepository(coreRepository, coreDirectory);
|
|
|
+ case ALL: {
|
|
|
+ LOG.info("Cloning L2J Loginserver");
|
|
|
+ cloneRepository(loginRepository, loginDirectory);
|
|
|
+
|
|
|
+ LOG.info("Cloning L2J Gameserver");
|
|
|
+ cloneRepository(gameRepository, gameDirectory);
|
|
|
|
|
|
LOG.info("Cloning L2J DataPack");
|
|
|
cloneRepository(datapackRepository, datapackDirectory);
|
|
|
break;
|
|
|
}
|
|
|
- case CORE: {
|
|
|
- LOG.info("Cloning L2J Server");
|
|
|
- cloneRepository(coreRepository, coreDirectory);
|
|
|
+ case LOGIN: {
|
|
|
+ LOG.info("Cloning L2J Loginserver");
|
|
|
+ cloneRepository(gameRepository, gameDirectory);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ case GAME: {
|
|
|
+ LOG.info("Cloning L2J Gameserver");
|
|
|
+ cloneRepository(gameRepository, gameDirectory);
|
|
|
break;
|
|
|
}
|
|
|
case DATAPACK: {
|