maybe fix new server count?

This commit is contained in:
Lee
2024-04-29 07:16:51 +01:00
parent 9babf45272
commit 6eb13e18eb
4 changed files with 90 additions and 76 deletions
README.md
src/main/java/cc/fascinated/piaservers

@ -12,22 +12,22 @@ public class GitUtils {
*/
public static void commitFiles(String message, Path... files) {
System.out.println("Committing files");
if (System.getenv("ENVIRONMENT").equals("production")) {
if (Config.isProduction()) {
runCommand("git", "config", "--global", "user.email", "liam+pia-servers-ci@fascinated.cc");
runCommand("git", "config", "--global", "user.name", "PIA Servers CI");
for (Path file : files) {
runCommand("git", "add", file.toAbsolutePath().toString());
}
runCommand("git", "commit", "-m", message);
runCommand("git", "push", "https://pia-servers-ci:%s@git.fascinated.cc/Fascinated/PIA-Servers".formatted(System.getenv("AUTH_TOKEN")));
}
for (Path file : files) {
runCommand("git", "add", file.toAbsolutePath().toString());
}
runCommand("git", "commit", "-m", message);
runCommand("git", "push", "https://pia-servers-ci:%s@git.fascinated.cc/Fascinated/PIA-Servers".formatted(System.getenv("AUTH_TOKEN")));
}
/**
* Clone the repository
*/
public static void cloneRepo() {
if (System.getenv("ENVIRONMENT").equals("production")) {
if (Config.isProduction()) {
System.out.println("Cloning repository");
runCommand("git", "clone", "https://git.fascinated.cc/Fascinated/PIA-Servers.git");
runCommand("mv", "PIA-Servers/.git", ".");