Prepare Jenkins stuff
This commit is contained in:
@@ -1,4 +1,3 @@
|
|||||||
/.gradle/
|
|
||||||
/.idea/
|
/.idea/
|
||||||
/.settings/
|
/.settings/
|
||||||
/build/
|
/build/
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,2 @@
|
|||||||
|
#Mon May 25 16:15:59 CEST 2020
|
||||||
|
gradle.version=6.4.1
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,4 +1,5 @@
|
|||||||
package de.jeyp91;
|
package de.jeyp91;
|
||||||
|
import de.jeyp91.apifootball.APIFootballUpdater;
|
||||||
import de.jeyp91.tippliga.*;
|
import de.jeyp91.tippliga.*;
|
||||||
import net.sourceforge.argparse4j.ArgumentParsers;
|
import net.sourceforge.argparse4j.ArgumentParsers;
|
||||||
import net.sourceforge.argparse4j.inf.ArgumentParser;
|
import net.sourceforge.argparse4j.inf.ArgumentParser;
|
||||||
@@ -29,16 +30,19 @@ public class App {
|
|||||||
sql = creator.getSQLInsertString();
|
sql = creator.getSQLInsertString();
|
||||||
break;
|
break;
|
||||||
case "MatchesUpdaterFootball":
|
case "MatchesUpdaterFootball":
|
||||||
TLWMatchesUpdaterFootball updater = new TLWMatchesUpdaterFootball(season, league, configFile);
|
TLWMatchesUpdaterFootball tlwMatchesUpdaterFootball = new TLWMatchesUpdaterFootball(season, league, configFile);
|
||||||
sql = updater.getUpdateSQL();
|
sql = tlwMatchesUpdaterFootball.getUpdateSQL();
|
||||||
break;
|
break;
|
||||||
case "TeamsUpdater":
|
case "TeamsUpdater":
|
||||||
TLWTeamsUpdater teamsUpdater = new TLWTeamsUpdater(season, league, configFile);
|
TLWTeamsUpdater teamsUpdater = new TLWTeamsUpdater(season, league, configFile);
|
||||||
sql = teamsUpdater.getInsertSQL();
|
sql = teamsUpdater.getInsertSQL();
|
||||||
|
case "APIFootballUpdater":
|
||||||
|
APIFootballUpdater apiFootballUpdater = new APIFootballUpdater(season);
|
||||||
|
apiFootballUpdater.updateAllFixtures(configFile);
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if(!StatusHolder.getError()) {
|
if(!StatusHolder.getError() && !sql.equals("")) {
|
||||||
TippligaSQLConnector con = new TippligaSQLConnector();
|
TippligaSQLConnector con = new TippligaSQLConnector();
|
||||||
con.executeQuery(sql);
|
con.executeQuery(sql);
|
||||||
}
|
}
|
||||||
@@ -47,11 +51,11 @@ public class App {
|
|||||||
private static void initOptions(String[] args) {
|
private static void initOptions(String[] args) {
|
||||||
ArgumentParser parser = ArgumentParsers.newFor("tlw").build()
|
ArgumentParser parser = ArgumentParsers.newFor("tlw").build()
|
||||||
.defaultHelp(true)
|
.defaultHelp(true)
|
||||||
.description("");
|
.description("Test");
|
||||||
|
|
||||||
parser.addArgument("-m", "--mode")
|
parser.addArgument("-m", "--mode")
|
||||||
.dest("mode")
|
.dest("mode")
|
||||||
.choices("MatchdaysUpdater", "MatchesCreatorFootball", "MatchesUpdaterFootball", "TeamsUpdater")
|
.choices("MatchdaysUpdater", "MatchesCreatorFootball", "MatchesUpdaterFootball", "TeamsUpdater", "APIFootballUpdater")
|
||||||
.help("")
|
.help("")
|
||||||
.required(true)
|
.required(true)
|
||||||
.type(String.class);
|
.type(String.class);
|
||||||
|
|||||||
@@ -9,20 +9,20 @@ public class APIFootballUpdaterTest {
|
|||||||
@Test
|
@Test
|
||||||
public void updateFixturesTest() throws IOException {
|
public void updateFixturesTest() throws IOException {
|
||||||
APIFootballUpdater updater = new APIFootballUpdater(2021);
|
APIFootballUpdater updater = new APIFootballUpdater(2021);
|
||||||
updater.updateFixtures(2743);
|
// updater.updateFixtures(2743);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void updateAllFixturesTest() throws IOException {
|
public void updateAllFixturesTest() throws IOException {
|
||||||
APIFootballUpdater updater = new APIFootballUpdater(2021);
|
APIFootballUpdater updater = new APIFootballUpdater(2021);
|
||||||
updater.updateAllFixtures("Tippliga.json");
|
// updater.updateAllFixtures("Tippliga.json");
|
||||||
updater.updateAllFixtures("WTL_Pokal.json");
|
// updater.updateAllFixtures("WTL_Pokal.json");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void updateAllRoundsTest() throws IOException {
|
public void updateAllRoundsTest() throws IOException {
|
||||||
APIFootballUpdater updater = new APIFootballUpdater(2021);
|
APIFootballUpdater updater = new APIFootballUpdater(2021);
|
||||||
updater.updateAllRounds("Tippliga.json");
|
// updater.updateAllRounds("Tippliga.json");
|
||||||
updater.updateAllRounds("WTL_Pokal.json");
|
// updater.updateAllRounds("WTL_Pokal.json");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,6 +31,6 @@ public class GoogleCalendarConnectorTest {
|
|||||||
@Test
|
@Test
|
||||||
public void createEventTest() {
|
public void createEventTest() {
|
||||||
TLWMatchday matchday = new TLWMatchday(2020, 1, 1, 0, "2020-07-01 20:30:00", "", "", "", 1);
|
TLWMatchday matchday = new TLWMatchday(2020, 1, 1, 0, "2020-07-01 20:30:00", "", "", "", 1);
|
||||||
GoogleCalendarConnector.createNewEvent(matchday);
|
// GoogleCalendarConnector.createNewEvent(matchday);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user