Skip to content

Commit

Permalink
Add helidon version check when building examples
Browse files Browse the repository at this point in the history
  • Loading branch information
barchetta committed Feb 28, 2024
1 parent 56cd29e commit 002bdaf
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions etc/scripts/build-examples.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,18 @@ error_trap_setup
# If needed we clone the helidon-examples repo into a subdirectory of the helidon repository
readonly HELIDON_EXAMPLES_PATH=${WS_DIR}/helidon-examples
if [ ! -d "${HELIDON_EXAMPLES_PATH}" ]; then
echo "Cloning examples repository into ${HELIDON_EXAMPLES_PATH}"
git clone [email protected]:helidon-io/helidon-examples.git "${HELIDON_EXAMPLES_PATH}"
cd "${HELIDON_EXAMPLES_PATH}"
git checkout dev-3.x
fi

# Make sure the helidon version from the example repo aligns with this repository
readonly HELIDON_VERSION_IN_THIS_REPO=$(mvn --non-recursive -f ${WS_DIR}/pom.xml help:evaluate -Dexpression=helidon.version | grep -v '\[INFO\]')
readonly HELIDON_VERSION_IN_EXAMPLES=$(mvn --non-recursive -f ${HELIDON_EXAMPLES_PATH}/pom.xml help:evaluate -Dexpression=helidon.version | grep -v '\[INFO\]')
if [ ${HELIDON_VERSION_IN_THIS_REPO} != ${HELIDON_VERSION_IN_EXAMPLES} ]; then
echo "The Helidon version in this repository (${HELIDON_VERSION_IN_THIS_REPO}) does not match the Helidon version in ${HELIDON_EXAMPLES_PATH} (${HELIDON_VERSION_IN_EXAMPLES})"
exit 78
fi

mvn ${MAVEN_ARGS} -f ${HELIDON_EXAMPLES_PATH}/pom.xml clean install

0 comments on commit 002bdaf

Please sign in to comment.