Skip to content

Commit

Permalink
Use snapshot in builds with snapshot CLI
Browse files Browse the repository at this point in the history
* When snapshot version of Quarkus is used, the quarkus.version property
  should be set to 999-SNAPSHOT with build CLI command
  • Loading branch information
mjurc committed Aug 13, 2024
1 parent 1bcbd7a commit 5f934cc
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public class QuarkusCliClient {
public static final String COMMAND_LOG_FILE = "quarkus-cli-command.out";
public static final String DEV_MODE_LOG_FILE = "quarkus-cli-dev.out";

private static final String QUARKUS_VERSION_PROPERTY_NAME = "quarkus.version";
private static final String QUARKUS_UPSTREAM_VERSION = "999-SNAPSHOT";
private static final String BUILD = "build";
private static final PropertyLookup COMMAND = new PropertyLookup("ts.quarkus.cli.cmd", "quarkus");
Expand All @@ -52,6 +53,9 @@ public Result run(String... args) {
public Result buildApplicationOnJvm(Path serviceFolder, String... extraArgs) {
List<String> args = new ArrayList<>();
args.add(BUILD);
if (isUpstream()) {
args.add("-D" + QUARKUS_VERSION_PROPERTY_NAME + "=" + QUARKUS_UPSTREAM_VERSION);
}
args.addAll(Arrays.asList(extraArgs));
return runCliAndWait(serviceFolder, args.toArray(new String[args.size()]));
}
Expand All @@ -60,6 +64,9 @@ public Result buildApplicationOnNative(Path serviceFolder, String... extraArgs)
List<String> args = new ArrayList<>();
args.add(BUILD);
args.add("--native");
if (isUpstream()) {
args.add("-D" + QUARKUS_VERSION_PROPERTY_NAME + "=" + QUARKUS_UPSTREAM_VERSION);
}
args.addAll(Arrays.asList(extraArgs));
return runCliAndWait(serviceFolder, args.toArray(new String[args.size()]));
}
Expand Down

0 comments on commit 5f934cc

Please sign in to comment.