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