Prepare Jenkins stuff

This commit is contained in:
2020-10-18 20:50:00 +02:00
parent 93cbcb75a4
commit 1b7bcbf9b0
24 changed files with 17 additions and 12 deletions

View File

@@ -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);