Last active
February 2, 2023 16:24
-
-
Save demeritcowboy/6b8473ec878100247b5a8b5bfefca71f to your computer and use it in GitHub Desktop.
Drupal 10 + CiviCRM download batch file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Edit these as appropriate | |
# This needs to be the numeric version corresponding to civi dev-master | |
CIVIVER=5.60.alpha1 | |
ROOTDIR=/full/path/to/folder/above/where/you/want/to/put/stuff | |
# Uncomment if you don't normally have php 8.1 in your path | |
#export PATH=/full/path/to/bin/folder/containing/php8.1:$PATH | |
cd $ROOTDIR | |
mkdir -p drupal10staging | |
cd drupal10staging | |
git clone --depth 1 https://github.com/civicrm/civicrm-core.git | |
cd civicrm-core | |
curl -L -O https://gist.githubusercontent.com/demeritcowboy/302a9b868f3a1a5d04925068ae487053/raw/fad0720fa51ef2be08ab9bf12f4084198f136439/drupal10civicrmcore.diff | |
git apply drupal10civicrmcore.diff | |
cd ../.. | |
export COMPOSER_MEMORY_LIMIT=-1 | |
composer create-project drupal/recommended-project:10.0.x-dev drupal10 --no-interaction | |
cd drupal10 | |
php -r 'file_put_contents("composer.json", str_replace('"'"'"type": "composer",'"'"', '"'"'"type": "path", "url": "'"$ROOTDIR"'/drupal10staging/civicrm-core", "options": {"versions": {"civicrm/civicrm-core": "'"$CIVIVER"'"}}},{"type": "composer",'"'"', file_get_contents("composer.json")));' | |
composer config extra.enable-patching true | |
composer config extra.compile-mode all | |
composer config --no-interaction --no-plugins allow-plugins.civicrm/composer-compile-plugin true | |
composer config --no-interaction --no-plugins allow-plugins.civicrm/composer-downloads-plugin true | |
composer config --no-interaction --no-plugins allow-plugins.civicrm/civicrm-asset-plugin true | |
composer config --no-interaction --no-plugins allow-plugins.cweagans/composer-patches true | |
composer require drush/drush | |
composer require --update-with-dependencies composer/installers:'^1.0' civicrm/civicrm-core:$CIVIVER civicrm/civicrm-packages:dev-master civicrm/civicrm-drupal-8:dev-master civicrm/civicrm-asset-plugin:'~1.1' | |
echo If vendor/civicrm/civicrm-core is a symlink, you may want to remove the link and simply move the folder from drupal10staging over into vendor/civicrm, since some install have trouble with symlinks. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment