From 47091e37bce38f8e4761aae824c5f7b37d0d1b84 Mon Sep 17 00:00:00 2001 From: Christian Fritsch Date: Tue, 22 Feb 2022 16:24:20 +0100 Subject: [PATCH 1/2] feat: allow usage of lenient endpoint --- configuration.sh | 3 +++ lib/stages/prepare_build.sh | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/configuration.sh b/configuration.sh index db42a7a..79119dd 100644 --- a/configuration.sh +++ b/configuration.sh @@ -160,6 +160,9 @@ DRUPAL_TESTING_INSTALLATION_FORM_VALUES=${DRUPAL_TESTING_INSTALLATION_FORM_VALUE # versions of dependencies are installed. DRUPAL_TESTING_MIN_BUILD=${DRUPAL_TESTING_MIN_BUILD:-false} +# Use the lenient drupal packagist endpoint. +DRUPAL_TESTING_USE_LENIENT_ENDPOINT=${DRUPAL_TESTING_USE_LENIENT_ENDPOINT:-false} + # The symfony environment variable to ignore deprecations, for possible values see symfony documentation. # The default value is "week" to ignore any deprecation notices. export SYMFONY_DEPRECATIONS_HELPER=${SYMFONY_DEPRECATIONS_HELPER-weak} diff --git a/lib/stages/prepare_build.sh b/lib/stages/prepare_build.sh index 964171e..d420035 100644 --- a/lib/stages/prepare_build.sh +++ b/lib/stages/prepare_build.sh @@ -55,7 +55,11 @@ _stage_prepare_build() { jq '.repositories[0].options.symlink = false' "${DRUPAL_TESTING_DRUPAL_INSTALLATION_DIRECTORY}""/composer.json" | awk 'BEGIN{RS="";getline<"-";print>ARGV[1]}' "${DRUPAL_TESTING_DRUPAL_INSTALLATION_DIRECTORY}""/composer.json" composer config repositories.1 composer https://asset-packagist.org --working-dir="${DRUPAL_TESTING_DRUPAL_INSTALLATION_DIRECTORY}" - composer config repositories.2 composer https://packages.drupal.org/8 --working-dir="${DRUPAL_TESTING_DRUPAL_INSTALLATION_DIRECTORY}" + if [ "${DRUPAL_TESTING_USE_LENIENT_ENDPOINT}" = true ]; then + composer config repositories.2 composer https://packages.drupal.org/lenient --working-dir="${DRUPAL_TESTING_DRUPAL_INSTALLATION_DIRECTORY}" + else + composer config repositories.2 composer https://packages.drupal.org/8 --working-dir="${DRUPAL_TESTING_DRUPAL_INSTALLATION_DIRECTORY}" + fi # Enable patching composer require cweagans/composer-patches --no-update --working-dir="${DRUPAL_TESTING_DRUPAL_INSTALLATION_DIRECTORY}" From a91c06117a5e1cce0b5c70645594bd240c333d3d Mon Sep 17 00:00:00 2001 From: Christian Fritsch Date: Tue, 22 Feb 2022 16:36:06 +0100 Subject: [PATCH 2/2] fix: always add the default packagist --- lib/stages/prepare_build.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/stages/prepare_build.sh b/lib/stages/prepare_build.sh index d420035..33f1dc4 100644 --- a/lib/stages/prepare_build.sh +++ b/lib/stages/prepare_build.sh @@ -56,10 +56,9 @@ _stage_prepare_build() { composer config repositories.1 composer https://asset-packagist.org --working-dir="${DRUPAL_TESTING_DRUPAL_INSTALLATION_DIRECTORY}" if [ "${DRUPAL_TESTING_USE_LENIENT_ENDPOINT}" = true ]; then - composer config repositories.2 composer https://packages.drupal.org/lenient --working-dir="${DRUPAL_TESTING_DRUPAL_INSTALLATION_DIRECTORY}" - else - composer config repositories.2 composer https://packages.drupal.org/8 --working-dir="${DRUPAL_TESTING_DRUPAL_INSTALLATION_DIRECTORY}" + composer config repositories.lenient composer https://packages.drupal.org/lenient --working-dir="${DRUPAL_TESTING_DRUPAL_INSTALLATION_DIRECTORY}" fi + composer config repositories.2 composer https://packages.drupal.org/8 --working-dir="${DRUPAL_TESTING_DRUPAL_INSTALLATION_DIRECTORY}" # Enable patching composer require cweagans/composer-patches --no-update --working-dir="${DRUPAL_TESTING_DRUPAL_INSTALLATION_DIRECTORY}"