Last active
February 12, 2019 20:34
-
-
Save dsnopek/56311dbea347874e75180883efabb620 to your computer and use it in GitHub Desktop.
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
################################ | |
# _ _ _ # | |
# /\ | | | | | | # | |
# / \ | | ___ _ __| |_| | # | |
# / /\ \ | |/ _ \ '__| __| | # | |
# / ____ \| | __/ | | |_|_| # | |
# /_/ \_\_|\___|_| \__(_) # | |
# # | |
################################ | |
# | |
# This is no longer the recommend way to get a Drupal 8 and CiviCR | |
# codebase assembled! | |
# | |
# Please see this article for the currently recommend way: | |
# | |
# https://www.mydropwizard.com/blog/better-way-install-civicrm-drupal-8 | |
# | |
# Below is the previous contents of this Gist... | |
# | |
# | |
# One day, hopefully, in the not-so-distant future, all that will be necessary is: | |
# | |
# composer require civicrm/civicrm-core | |
# | |
# But for now, the following commands will do the trick! | |
# | |
# NOTE: These command should all be run at the top-level Drupal directory. | |
# | |
# What version do we want? | |
CIVICRM_VERSION=5.3.1 | |
# Repositories aren't inherited from requirements, so we have to put this one from civicrm-core/composer.json again | |
composer config repositories.zetacomponents-mail vcs https://github.com/civicrm/zetacomponents-mail.git | |
# | |
# RE-RUN THE COMMANDS BELOW TO UPGRADE CIVICRM (after first changing $CIVICRM_VERSION) | |
# | |
# (NOTE: if you do an upgrade, remember to do the database updates on the site afterward | |
# via /civicrm/upgrade?reset=1 or 'drush cvupdb') | |
# | |
# Require civicrm-core at the requested version. | |
composer require "civicrm/civicrm-core:$CIVICRM_VERSION" | |
# Run 'bower install' to get Javascript stuff | |
(cd vendor/civicrm/civicrm-core && bower install) | |
# Download the latest Drupal package to copy some stuff that's | |
# generated by the build and included in release tarballs. | |
wget -O /tmp/civicrm.tar.gz https://download.civicrm.org/civicrm-$CIVICRM_VERSION-drupal.tar.gz | |
tar -xzf /tmp/civicrm.tar.gz -C /tmp | |
# Copy the 3rd party dependencies (Whaaaat? Someone who's been doing CiviCRM for a while | |
# will need to explain this to me :-) Why not use composer for pulling in these too?) | |
cp -r /tmp/civicrm/packages vendor/civicrm/civicrm-core/ | |
# Setup the civicrm-version.php | |
cat /tmp/civicrm/civicrm-version.php | sed -e 's/Drupal/Drupal8/' > vendor/civicrm/civicrm-core/civicrm-version.php | |
# Copy sql | |
cp -r /tmp/civicrm/sql vendor/civicrm/civicrm-core/ | |
# Copy some misc other things | |
cp /tmp/civicrm/civicrm.config.php vendor/civicrm/civicrm-core/ | |
cp /tmp/civicrm/CRM/Core/I18n/SchemaStructure.php vendor/civicrm/civicrm-core/CRM/Core/I18n/ | |
cp /tmp/civicrm/install/langs.php vendor/civicrm/civicrm-core/install/ | |
# Clean-up | |
rm -rf /tmp/civicrm.tar.gz /tmp/civicrm |
regarding the conflicting psr/log
requirement:
As it seems the dependency is about to be updated to 1.1 anyway, another workaround is to set an alias in your (drupal) composer.json to "fake" 1.1 to be accepted for 1.0.0 by changing"require": { "psr/log": "^1.1"}
to "require": { "psr/log": "1.1.0 as 1.0.0"}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I posted a recap of blocking issues (and links to various resources) here: https://lab.civicrm.org/dev/drupal/wikis/drupal8-composer