From ee70da5d54fd0b5352786c6629d56f76200044e1 Mon Sep 17 00:00:00 2001 From: Joe Di Pol Date: Thu, 26 Sep 2024 17:48:27 -0700 Subject: [PATCH] Change example testing scripts to handle dev-4.x not having right version --- etc/scripts/build-examples.sh | 11 +++++------ etc/scripts/test-quickstarts.sh | 10 +++++----- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/etc/scripts/build-examples.sh b/etc/scripts/build-examples.sh index ca5d254be35..b818d046fb4 100755 --- a/etc/scripts/build-examples.sh +++ b/etc/scripts/build-examples.sh @@ -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") diff --git a/etc/scripts/test-quickstarts.sh b/etc/scripts/test-quickstarts.sh index b66ca5d9faf..a797481a4b8 100755 --- a/etc/scripts/test-quickstarts.sh +++ b/etc/scripts/test-quickstarts.sh @@ -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