Skip to content

Commit

Permalink
Added isRHBQ method to check if the version contains string redhat
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Berecz committed Sep 9, 2024
1 parent afeffbd commit a3ee180
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ public static void changePropertiesInPom(QuarkusCliRestService app, Properties p
*/
public static void setCommunityBomIfNotRunningRHBQ(QuarkusCliRestService app, String communityQuarkusVersion)
throws XmlPullParserException, IOException {
if (!QuarkusProperties.getVersion().contains("redhat")) {
if (!QuarkusProperties.isRHBQ()) {
Properties communityBomProperties = new Properties();
communityBomProperties.put("quarkus.platform.group-id", "io.quarkus.platform");
communityBomProperties.put("quarkus.platform.version", communityQuarkusVersion);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ private QuarkusProperties() {

}

public static boolean isRHBQ() {
return QuarkusProperties.getVersion().contains("redhat");
}

public static String getVersion() {
return defaultVersionIfEmpty(PLATFORM_VERSION.get());
}
Expand Down

0 comments on commit a3ee180

Please sign in to comment.