Skip to content

Commit a6dea48

Browse files
committed
Fix CAMEL_VERSION and QUARKUS_VERSION logic
1 parent c28ab06 commit a6dea48

2 files changed

Lines changed: 30 additions & 8 deletions

File tree

product/README.adoc

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -136,24 +136,20 @@ Basic usage:
136136

137137
[source,shell]
138138
----
139-
export MRRC_LOCAL="/Users/<username>/Downloads/rh-quarkus-platform-3.33.2.SP1-maven-repository/maven-repository" # path to unzipped MRRC ZIP
139+
export MRRC_LOCAL_REPO="/Users/<username>/Downloads/rh-quarkus-platform-3.33.2.SP1-maven-repository/maven-repository" # path to unzipped MRRC ZIP
140140
141141
export QUARKUS_PLATFORM_VERSION="3.33.2.SP1-redhat-00001"
142142
export CAMEL_QUARKUS_VERSION="3.33.0.redhat-00008"
143-
export QUARKUS_VERSION="3.33.2.redhat-00004"
144-
export CAMEL_VERSION="4.18.1.redhat-00026"
145143
146144
"./camel-quarkus-testing.sh" \
147145
--camel-quarkus-dir ".." \
148-
--mrrc-local "${MRRC_LOCAL}" \
146+
--mrrc-local "${MRRC_LOCAL_REPO}" \
149147
--quarkus-platform-group-id com.redhat.quarkus.platform \
150148
--quarkus-platform-artifact-id quarkus-bom \
151149
--quarkus-platform-version "${QUARKUS_PLATFORM_VERSION}" \
152150
--camel-quarkus-platform-group-id com.redhat.quarkus.platform \
153151
--camel-quarkus-platform-artifact-id quarkus-camel-bom \
154152
--camel-quarkus-platform-version "${QUARKUS_PLATFORM_VERSION}" \
155-
--quarkus-version "${QUARKUS_VERSION}" \
156-
--camel-version "${CAMEL_VERSION}" \
157153
--run-against-mrrc-only \
158154
--test-modules "integration-tests/docling" \
159155
--verbose

product/camel-quarkus-testing.sh

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,18 +255,34 @@ log "CAMEL_QUARKUS_PLATFORM_ARTIFACT_ID = $CAMEL_QUARKUS_PLATFORM_ARTIFACT_ID"
255255
CAMEL_QUARKUS_PLATFORM_VERSION="${CAMEL_QUARKUS_PLATFORM_VERSION:-$QUARKUS_PLATFORM_VERSION}"
256256
log "CAMEL_QUARKUS_PLATFORM_VERSION = $CAMEL_QUARKUS_PLATFORM_VERSION"
257257

258-
if [[ -z "$QUARKUS_VERSION" && -n "$MRRC_LOCAL" ]]; then
258+
if [[ -z "$QUARKUS_VERSION" && -n "$MRRC_LOCAL" && "$RUN_AGAINST_MRRC_ONLY" == "true" ]]; then
259259
QUARKUS_VERSION="$(ls "${MRRC_LOCAL}/io/quarkus/quarkus-core/" 2>/dev/null | head -1)"
260260
log "QUARKUS_VERSION derived from MRRC_LOCAL"
261261
fi
262262
log "QUARKUS_VERSION = $QUARKUS_VERSION"
263263

264-
if [[ -z "$CAMEL_VERSION" && -n "$MRRC_LOCAL" ]]; then
264+
# Validate that QUARKUS_VERSION is set when RUN_AGAINST_MRRC_ONLY is enabled
265+
if [[ "$RUN_AGAINST_MRRC_ONLY" == "true" && -z "$QUARKUS_VERSION" ]]; then
266+
echo "Error: When --run-against-mrrc-only is set, QUARKUS_VERSION must be specified either via:"
267+
echo " 1. --quarkus-version parameter, or"
268+
echo " 2. --mrrc-local (QUARKUS_VERSION will be derived from MRRC)"
269+
exit 1
270+
fi
271+
272+
if [[ -z "$CAMEL_VERSION" && -n "$MRRC_LOCAL" && "$RUN_AGAINST_MRRC_ONLY" == "true" ]]; then
265273
CAMEL_VERSION="$(ls "${MRRC_LOCAL}/org/apache/camel/camel-direct/" 2>/dev/null | head -1)"
266274
log "CAMEL_VERSION derived from MRRC_LOCAL"
267275
fi
268276
log "CAMEL_VERSION = $CAMEL_VERSION"
269277

278+
# Validate that CAMEL_VERSION is set when RUN_AGAINST_MRRC_ONLY is enabled
279+
if [[ "$RUN_AGAINST_MRRC_ONLY" == "true" && -z "$CAMEL_VERSION" ]]; then
280+
echo "Error: When --run-against-mrrc-only is set, CAMEL_VERSION must be specified either via:"
281+
echo " 1. --camel-version parameter, or"
282+
echo " 2. --mrrc-local (CAMEL_VERSION will be derived from MRRC)"
283+
exit 1
284+
fi
285+
270286
# Build common Maven arguments
271287
COMMON_MVN_ARGS="-B -ntp -Dformatter.skip -Dimpsort.skip -Denforcer.skip -DbuildMetaData.skip -Dcq.camel-prod-excludes.skip=true -Dcamel-quarkus.update-extension-doc-page.skip -Djava.home=$JAVA_HOME"
272288

@@ -325,6 +341,16 @@ EOF
325341
cd /*[local-name()="project"]/*[local-name()="properties"]/*[local-name()="camel.version"]
326342
set $CAMEL_VERSION
327343
save
344+
EOF
345+
fi
346+
347+
# Replace Quarkus version in the top pom.xml
348+
if [[ -n "$QUARKUS_VERSION" ]]; then
349+
log "Replacing Quarkus version to $QUARKUS_VERSION in pom.xml"
350+
xmllint --shell pom.xml <<EOF
351+
cd /*[local-name()="project"]/*[local-name()="properties"]/*[local-name()="quarkus.version"]
352+
set $QUARKUS_VERSION
353+
save
328354
EOF
329355
fi
330356
fi

0 commit comments

Comments
 (0)