From 31c2e92b28cd57eae3f7463a0eab87c14d9b13d8 Mon Sep 17 00:00:00 2001 From: Peter Havekes Date: Mon, 6 Jan 2025 14:59:57 +0100 Subject: [PATCH] Use composer version from component_info --- stepup-build2.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/stepup-build2.sh b/stepup-build2.sh index 6d31c1d..1936023 100755 --- a/stepup-build2.sh +++ b/stepup-build2.sh @@ -183,6 +183,14 @@ if [ -z "${PHP}" ]; then fi PHP_VERSION_STRING=$(${PHP} -r 'echo phpversion();') +# Update or downgrade composer to the version required in the component_info file +if [ ${COMPOSER_VERSION} = 2 ]; then + ${COMPOSER} self-update --2 +fi +if [ ${COMPOSER_VERSION} = 1 ]; then + ${COMPOSER} self-update --1 +fi + COMPOSER_VERSION_STRING=$(${PHP} "${COMPOSER}" --version) # Set working directory to the root of the component