maybe this will work?
All checks were successful
Deploy to Dokku / docker (ubuntu-latest) (push) Successful in 39s
All checks were successful
Deploy to Dokku / docker (ubuntu-latest) (push) Successful in 39s
This commit is contained in:
parent
123b01d1d0
commit
387c1b1f0c
@ -11,6 +11,7 @@ public class GitUtils {
|
||||
* @param files The files to commit
|
||||
*/
|
||||
public static void commitFiles(String message, Path... files) {
|
||||
System.out.println("Committing files");
|
||||
if (System.getenv("ENVIRONMENT").equals("production")) {
|
||||
runCommand("git", "config", "--global", "user.email", "liam+pia-servers-ci@fascinated.cc");
|
||||
runCommand("git", "config", "--global", "user.name", "PIA Servers CI");
|
||||
@ -27,6 +28,7 @@ public class GitUtils {
|
||||
*/
|
||||
public static void cloneRepo() {
|
||||
if (System.getenv("ENVIRONMENT").equals("production")) {
|
||||
System.out.println("Cloning repository");
|
||||
runCommand("git", "clone", "https://git.fascinated.cc/Fascinated/PIA-Servers.git");
|
||||
}
|
||||
}
|
||||
|
@ -1,16 +1,19 @@
|
||||
package cc.fascinated.piaservers.model;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@AllArgsConstructor @Getter @Setter
|
||||
@EqualsAndHashCode(onlyExplicitlyIncluded = true)
|
||||
public class PiaServer {
|
||||
/**
|
||||
* The IP of this server.
|
||||
*/
|
||||
@EqualsAndHashCode.Include
|
||||
private final String ip;
|
||||
|
||||
/**
|
||||
|
@ -26,7 +26,7 @@ public class PiaManager {
|
||||
private static final HttpClient HTTP_CLIENT = HttpClient.newHttpClient();
|
||||
private static final String PIA_OPENVPN_CONFIGS_URL = "https://www.privateinternetaccess.com/openvpn/openvpn.zip";
|
||||
private static final long REMOVAL_THRESHOLD = TimeUnit.DAYS.toMicros(14); // 2 weeks
|
||||
public static List<PiaServer> SERVERS = new ArrayList<>();
|
||||
public static Set<PiaServer> SERVERS = new HashSet<>();
|
||||
|
||||
@SneakyThrows
|
||||
public PiaManager() {
|
||||
@ -38,7 +38,7 @@ public class PiaManager {
|
||||
// Load the serversFile from the file
|
||||
SERVERS = Main.GSON.fromJson(Files.readString(serversFile.toPath()), new TypeToken<List<PiaServer>>() {}.getType());
|
||||
if (SERVERS == null) {
|
||||
SERVERS = new ArrayList<>();
|
||||
SERVERS = new HashSet<>();
|
||||
}
|
||||
|
||||
GitUtils.cloneRepo(); // Clone the repository
|
||||
|
Loading…
Reference in New Issue
Block a user