Skip to content

Commit

Permalink
Speed up build
Browse files Browse the repository at this point in the history
  • Loading branch information
koppor committed Sep 3, 2023
1 parent 99578e3 commit 84d17e0
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/main/java/org/jabref/cli/JournalListMvGenerator.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ public static void main(String[] args) throws IOException {
System.out.println("Path " + abbreviationsDirectory.toAbsolutePath() + " does not exist");
System.exit(1);
}
Path journalListMvFile = Path.of("build", "resources", "main", "journals", "journal-list.mv");
if (Files.exists(journalListMvFile)) {
System.out.println("Target " + journalListMvFile.toAbsolutePath() + " already exists.");
System.out.println("Skipping generation.");
System.out.println("If you really want to re-generate, please delete the file.");
System.exit(2);
}

Set<String> ignoredNames = Set.of(
// remove all lists without dot in them:
// we use abbreviation lists containing dots in them only (to be consistent)
Expand All @@ -35,8 +43,6 @@ public static void main(String[] args) throws IOException {
"journal_abbreviations_ieee_strings.csv"
);

Path journalListMvFile = Path.of("build", "resources", "main", "journals", "journal-list.mv");
Files.deleteIfExists(journalListMvFile);
Files.createDirectories(journalListMvFile.getParent());

try (DirectoryStream<Path> stream = Files.newDirectoryStream(abbreviationsDirectory, "*.csv");
Expand Down

0 comments on commit 84d17e0

Please sign in to comment.