Skip to content

Commit

Permalink
Bump build and release script to JDK 17
Browse files Browse the repository at this point in the history
  • Loading branch information
gastaldi committed Nov 30, 2023
1 parent 3ac090d commit 269a59d
Showing 1 changed file with 23 additions and 4 deletions.
27 changes: 23 additions & 4 deletions patches/BumpToJDK17.java
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
}
}
}
}

0 comments on commit 269a59d

Please sign in to comment.