diff --git a/patches/BumpToJDK17.java b/patches/BumpToJDK17.java index 93ca59b..f6b4c5c 100755 --- a/patches/BumpToJDK17.java +++ b/patches/BumpToJDK17.java @@ -9,10 +9,29 @@ public class BumpToJDK17 { public static void main(String... args) throws Exception { - Path workflowFile = Path.of(".github/workflows/quarkus-snapshot.yaml"); - if (Files.exists(workflowFile)) { - Files.writeString(workflowFile, - Files.readString(workflowFile).replace("JAVA_VERSION: 11", "JAVA_VERSION: 17")); + // Update snapshot workflow + { + Path workflowFile = Path.of(".github/workflows/quarkus-snapshot.yaml"); + if (Files.exists(workflowFile)) { + Files.writeString(workflowFile, + Files.readString(workflowFile).replace("JAVA_VERSION: 11", "JAVA_VERSION: 17")); + } + } + // Update release workflow + { + Path workflowFile = Path.of(".github/workflows/release.yml"); + if (Files.exists(workflowFile)) { + String contents = Files.readString(workflowFile); + Files.writeString(workflowFile, contents.replace("JDK 11", "JDK 17").replace("java-version: 11", "java-version: 17")); + } + } + // Update build.yaml as well + { + Path workflowFile = Path.of(".github/workflows/build.yml"); + if (Files.exists(workflowFile)) { + String contents = Files.readString(workflowFile); + Files.writeString(workflowFile, contents.replace("JDK 11", "JDK 17").replace("java-version: 11", "java-version: 17")); + } } } }