Skip to content

Commit

Permalink
Change example testing scripts to handle dev-4.x not having right ver…
Browse files Browse the repository at this point in the history
…sion
  • Loading branch information
barchetta committed Sep 27, 2024
1 parent 01fbeb6 commit ee70da5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
11 changes: 5 additions & 6 deletions etc/scripts/build-examples.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,11 @@ readonly HELIDON_VERSION
# If needed we clone the helidon-examples repo
if [ ! -d "${WS_DIR}/helidon-examples" ]; then
echo "Cloning examples repository into ${WS_DIR}/helidon-examples"
git clone --branch dev-4.x --single-branch https://github.com/helidon-io/helidon-examples.git "${WS_DIR}/helidon-examples"

# If in a tag, update the version on the fly
if [ -n "$(git tag --points-at HEAD)" ] ; then
"${WS_DIR}/helidon-examples"/etc/scripts/update-version.sh "${HELIDON_VERSION}"
fi
# We can't clone the dev-4.x branch since that has already moved on to the Helidon version in main.
# So we use the tag of the last matching minor, then update the helidon version in examples to
# match what is in our branch
git clone --branch 4.1.1 --single-branch https://github.com/helidon-io/helidon-examples.git "${WS_DIR}/helidon-examples"
"${WS_DIR}/helidon-examples"/etc/scripts/update-version.sh "${HELIDON_VERSION}"
fi

HELIDON_VERSION_IN_EXAMPLES=$(version "${WS_DIR}/helidon-examples/pom.xml")
Expand Down
10 changes: 5 additions & 5 deletions etc/scripts/test-quickstarts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@ readonly HELIDON_VERSION
# If needed we clone the helidon-examples repo
if [ ! -d "${WS_DIR}/helidon-examples" ]; then
echo "Cloning examples repository into ${WS_DIR}/helidon-examples"
git clone --branch dev-4.x --single-branch https://github.com/helidon-io/helidon-examples.git "${WS_DIR}/helidon-examples"

# If in a tag, update the version on the fly
if [ -n "$(git tag --points-at HEAD)" ] ; then
"${WS_DIR}/helidon-examples"/etc/scripts/update-version.sh "${HELIDON_VERSION}"
fi
# We can't clone the dev-4.x branch since that has already moved on to the Helidon version in main.
# So we use the tag of the last matching minor, then update the helidon version in examples to
# match what is in our branch
git clone --branch 4.1.1 --single-branch https://github.com/helidon-io/helidon-examples.git "${WS_DIR}/helidon-examples"
"${WS_DIR}/helidon-examples"/etc/scripts/update-version.sh "${HELIDON_VERSION}"
fi

# Build quickstart native-image executable and run jar file
Expand Down

0 comments on commit ee70da5

Please sign in to comment.