Skip to content

Commit

Permalink
Merge pull request #1294 from TimonCzech/Added-isRHBQ-method
Browse files Browse the repository at this point in the history
Added isRHBQ method to check if the version contain string redhat
  • Loading branch information
jedla97 authored Sep 9, 2024
2 parents afeffbd + a3ee180 commit 7413aff
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 7413aff

Please sign in to comment.