From 31319620288721926112a8e872927a4c2e2a343d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20L=C3=B3pez?= Date: Wed, 11 Dec 2024 12:07:36 +0100 Subject: [PATCH] fix: Fixing some problems with drupal multiversion and verbose output on install --- commands/host/aljibe-kickstart | 13 ++++--------- install.yaml | 2 +- kickstart/d10/composer.json | 11 ++++++----- scripts/install-dependencies.sh | 6 ++---- site-profiles | 1 - 5 files changed, 13 insertions(+), 20 deletions(-) diff --git a/commands/host/aljibe-kickstart b/commands/host/aljibe-kickstart index b96f544..dd0ac54 100644 --- a/commands/host/aljibe-kickstart +++ b/commands/host/aljibe-kickstart @@ -1,12 +1,11 @@ #!/bin/bash #ddev-generated ## Description: Copy kickstar files to the project root -## Usage: aljibe-kickstart +## Usage: aljibe-kickstart [options] ## Flags: [{"Name":"noinstall","Usage":"setup --noinstall"}] ## Example: ddev aljibe-kickstart DRUPAL_VERSION=d11 -PROJECT_TYPE=drupal11 AUTO_CONFIRM=false # Check if ${DDEV_APPROOT}/.ddev/kickstart/ exists, if not show a warning and exit @@ -18,7 +17,6 @@ if [ ! -d "${DDEV_APPROOT}/.ddev/kickstart" ]; then exit 1 fi - while (( "$#" )); do case "$1" in -y|--yes) @@ -27,7 +25,6 @@ while (( "$#" )); do ;; d10) DRUPAL_VERSION=d10 - PROJECT_TYPE=drupal10 shift ;; *) @@ -45,10 +42,8 @@ fi if [ "$CONFIRMATION" != "n" ]; then cp -rTf ${DDEV_APPROOT}/.ddev/kickstart/common ${DDEV_APPROOT} - cp -rTf ${DDEV_APPROOT}/.ddev/kickstart/common/${DRUPAL_VERSION} ${DDEV_APPROOT} - rm -fR ${DDEV_APPROOT}/.ddev/kickstart - ddev config --project-type=${PROJECT_TYPE} --docroot=web - echo "Kickstart files have been copied." + cp -rTf ${DDEV_APPROOT}/.ddev/kickstart/${DRUPAL_VERSION} ${DDEV_APPROOT} + echo "Kickstart files have been copied. Make sure yout .gitignore file ignores .ddev/kickstart directory." else - echo "Operation cancelled." + echo "Kickstart operation cancelled." fi \ No newline at end of file diff --git a/install.yaml b/install.yaml index f116655..88592c1 100644 --- a/install.yaml +++ b/install.yaml @@ -3,7 +3,7 @@ description: project_files: - commands - scripts - - aljibe-kickstart + - kickstart - aljibe.yaml.example - site-profiles - config.aljibe.yaml diff --git a/kickstart/d10/composer.json b/kickstart/d10/composer.json index 893f65c..640eca8 100644 --- a/kickstart/d10/composer.json +++ b/kickstart/d10/composer.json @@ -54,15 +54,16 @@ "allow-plugins": { "composer/installers": true, "cweagans/composer-patches": true, - "drupal/core-composer-scaffold": true, "dealerdirect/phpcodesniffer-composer-installer": true, - "phpstan/extension-installer": true, - "phpro/grumphp": true, - "metadrop/backstopjs-addons": true, + "drupal/core-composer-scaffold": true, "liborm85/composer-vendor-cleaner": true, + "metadrop/backstopjs-addons": true, "metadrop/composer-comments": true, + "mxr576/ddqg-composer-audit": true, "php-http/discovery": true, - "liborm85/composer-vendor-cleaner": true + "phpro/grumphp": true, + "phpstan/extension-installer": true, + "tbachert/spi": true } }, "scripts": { diff --git a/scripts/install-dependencies.sh b/scripts/install-dependencies.sh index 2e5ba4f..70c22f0 100755 --- a/scripts/install-dependencies.sh +++ b/scripts/install-dependencies.sh @@ -22,10 +22,8 @@ fi # Function to check if an addon is installed check_addon_installed() { if ddev add-on list --installed --skip-hooks | grep -i "$1" -q; then - echo "** $1 ound" return 1 # Found else - echo "XX $1 not found" return 0 # Not found fi } @@ -37,10 +35,10 @@ install_addon() { # Install if Aljibe is not installed (ALJIBE_INSTALLED=0), or if both Aljibe and the addon are installed if [ "$ALJIBE_INSTALLED" -eq 0 ] || ([ "$ALJIBE_INSTALLED" -eq 1 ] && ! check_addon_installed "$addon_name"); then - echo "**** Installing $addon_name..." + echo "**** $addon_name found. Installing/Updating it." ddev add-on get "$addon_path" else - echo "XXXX Skipping $addon_name installation" + echo "XXXX $addon_name not found. Skipping installation." fi } diff --git a/site-profiles b/site-profiles index 191c34c..51d5dbf 100644 --- a/site-profiles +++ b/site-profiles @@ -1,6 +1,5 @@ #!/bin/bash - ## *** DO NOT REMOVE THIS FILE *** ## This is an auxiliary file for site installation in Aljibe. ## It is responsible for setting the DRUPAL_PROFILE variable based on