Prepare Jenkins stuff
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
package de.jeyp91;
|
||||
import de.jeyp91.apifootball.APIFootballUpdater;
|
||||
import de.jeyp91.tippliga.*;
|
||||
import net.sourceforge.argparse4j.ArgumentParsers;
|
||||
import net.sourceforge.argparse4j.inf.ArgumentParser;
|
||||
@@ -29,16 +30,19 @@ public class App {
|
||||
sql = creator.getSQLInsertString();
|
||||
break;
|
||||
case "MatchesUpdaterFootball":
|
||||
TLWMatchesUpdaterFootball updater = new TLWMatchesUpdaterFootball(season, league, configFile);
|
||||
sql = updater.getUpdateSQL();
|
||||
TLWMatchesUpdaterFootball tlwMatchesUpdaterFootball = new TLWMatchesUpdaterFootball(season, league, configFile);
|
||||
sql = tlwMatchesUpdaterFootball.getUpdateSQL();
|
||||
break;
|
||||
case "TeamsUpdater":
|
||||
TLWTeamsUpdater teamsUpdater = new TLWTeamsUpdater(season, league, configFile);
|
||||
sql = teamsUpdater.getInsertSQL();
|
||||
case "APIFootballUpdater":
|
||||
APIFootballUpdater apiFootballUpdater = new APIFootballUpdater(season);
|
||||
apiFootballUpdater.updateAllFixtures(configFile);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if(!StatusHolder.getError()) {
|
||||
if(!StatusHolder.getError() && !sql.equals("")) {
|
||||
TippligaSQLConnector con = new TippligaSQLConnector();
|
||||
con.executeQuery(sql);
|
||||
}
|
||||
@@ -47,11 +51,11 @@ public class App {
|
||||
private static void initOptions(String[] args) {
|
||||
ArgumentParser parser = ArgumentParsers.newFor("tlw").build()
|
||||
.defaultHelp(true)
|
||||
.description("");
|
||||
.description("Test");
|
||||
|
||||
parser.addArgument("-m", "--mode")
|
||||
.dest("mode")
|
||||
.choices("MatchdaysUpdater", "MatchesCreatorFootball", "MatchesUpdaterFootball", "TeamsUpdater")
|
||||
.choices("MatchdaysUpdater", "MatchesCreatorFootball", "MatchesUpdaterFootball", "TeamsUpdater", "APIFootballUpdater")
|
||||
.help("")
|
||||
.required(true)
|
||||
.type(String.class);
|
||||
|
||||
Reference in New Issue
Block a user