Skip to content

Commit

Permalink
Directly extract graalvm archive to target directory
Browse files Browse the repository at this point in the history
This way we avoid issues with releases with 0 MINOR and SECURITY digits
in the version number, e.g. 21.0.0 which when decompressed results in a
folder called graalvm-community-openjdk-21+35.1 instead of
graalvm-community-openjdk-21.0.0+35.1
  • Loading branch information
zakkak committed Sep 20, 2023
1 parent 52f1127 commit 9297e4f
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ public class GraalVMModule extends AbstractModule {
&& rm -Rf %s""";

private static final String NEW_TEMPLATE = """
tar xzf %s -C /opt \\
&& mv /opt/graalvm-community-openjdk-%s* /opt/graalvm \\
mkdir -p /opt/graalvm \\
&& tar xzf %s -C /opt/graalvm --strip-components=1 \\
&& rm -Rf %s""";
private final String graalvmVersion;

Expand Down Expand Up @@ -78,7 +78,6 @@ public List<Command> commands(BuildContext bc) {
} else {
script = NEW_TEMPLATE.formatted(
"/tmp/" + artifact.name, // tar
graalvmVersion,
"/tmp/" + artifact.name); // rm
}

Expand Down

0 comments on commit 9297e4f

Please sign in to comment.