-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #496 from totten/master-d8-2020
Various D8 updates
- Loading branch information
Showing
12 changed files
with
265 additions
and
228 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
|
||
## download.sh -- Download Drupal and CiviCRM | ||
|
||
############################################################################### | ||
|
||
#[ -z "$CMS_VERSION" ] && CMS_VERSION=8.7.x | ||
[ -z "$CMS_VERSION" ] && CMS_VERSION=8.x-dev | ||
|
||
composer create-project drupal-composer/drupal-project:"$CMS_VERSION" "$WEB_ROOT" --no-interaction | ||
|
||
pushd "$WEB_ROOT" >> /dev/null | ||
composer require drupal/{devel,libraries,userprotect} | ||
composer require civicrm/civicrm-asset-plugin:'~1.0.0' civicrm/civicrm-setup:'dev-master as 0.2.99' civicrm/civicrm-{core,packages,drupal-8}:$(civicrm_composer_ver "$CIVI_VERSION") pear/pear_exception:'1.0.1 as 1.0.0' --prefer-source | ||
|
||
## FIXME: All of the following should be removed/replaced as things get cleaner. | ||
composer require "cache/integration-tests:dev-master#b97328797ab199f0ac933e39842a86ab732f21f9" ## Issue: it's a require-dev in civicrm-core for E2E/Cache/*; how do we pull in civi require-dev without all other require-dev? | ||
case "$CIVI_VERSION" in | ||
5.21*) git scan -N am https://github.com/civicrm/civicrm-core/pull/16328 ; ;; ## Issue: Patches needed in 5.21 | ||
5.22*) git scan -N am https://github.com/civicrm/civicrm-core/pull/16413 ; ;; ## Issue: Patches needed in 5.22 have one trivial difference | ||
master) git scan -N am https://github.com/civicrm/civicrm-core/pull/{16403,16405,16406,16407,16408,16409} ; ;; ## Issue: This list may be volatile as PRs are getting reviewed. | ||
*) cvutil_fatal "This build type is temporarily limited to branch which have a corresponding patchset." ; ;; | ||
esac | ||
extract-url --cache-ttl 172800 vendor/civicrm/civicrm-core/l10n=http://download.civicrm.org/civicrm-l10n-core/archives/civicrm-l10n-daily.tar.gz ## Issue: Don't write directly into vendor tree | ||
popd >> /dev/null |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
#!/bin/bash | ||
|
||
## Transition: Old builds don't have "web/" folder. New builds do. | ||
## TODO: Simplify sometime after Dec 2019 | ||
## install.sh -- Create config files and databases; fill the databases | ||
[ -d "$WEB_ROOT/web" ] && CMS_ROOT="$WEB_ROOT/web" | ||
|
||
############################################################################### | ||
## Create virtual-host and databases | ||
|
||
amp_install | ||
|
||
############################################################################### | ||
## Setup Drupal (config files, database tables) | ||
|
||
drupal8_install | ||
DRUPAL_SITE_DIR=$(_drupal_multisite_dir "$CMS_URL" "$SITE_ID") | ||
pushd "${CMS_ROOT}/sites/${DRUPAL_SITE_DIR}" >> /dev/null | ||
drush8 -y updatedb | ||
drush8 -y en libraries | ||
popd >> /dev/null | ||
|
||
############################################################################### | ||
## Setup CiviCRM (config files, database tables) | ||
|
||
CIVI_DOMAIN_NAME="Demonstrators Anonymous" | ||
CIVI_DOMAIN_EMAIL="\"Demonstrators Anonymous\" <info@example.org>" | ||
CIVI_CORE="${WEB_ROOT}/vendor/civicrm/civicrm-core" | ||
CIVI_UF="Drupal8" | ||
GENCODE_CONFIG_TEMPLATE="${CMS_ROOT}/modules/contrib/civicrm/civicrm.config.php.drupal" | ||
|
||
pushd "${CMS_ROOT}/sites/${DRUPAL_SITE_DIR}" >> /dev/null | ||
civicrm_install_cv | ||
popd >> /dev/null | ||
|
||
############################################################################### | ||
## Extra configuration | ||
pushd "${CMS_ROOT}/sites/${DRUPAL_SITE_DIR}" >> /dev/null | ||
|
||
## make sure drush functions are loaded | ||
drush8 cc drush -y | ||
|
||
## Setup CiviCRM -- But not in 'clean' config! | ||
#echo '{"enable_components":["CiviEvent","CiviContribute","CiviMember","CiviMail","CiviReport","CiviPledge","CiviCase","CiviCampaign"]}' \ | ||
# | drush8 cvapi setting.create --in=json | ||
#civicrm_apply_demo_defaults | ||
#cv ev 'return CRM_Utils_System::synchronizeUsers();' | ||
|
||
## Setup demo user | ||
civicrm_apply_d8_perm_defaults | ||
drush8 -y user-create --password="$DEMO_PASS" --mail="$DEMO_EMAIL" "$DEMO_USER" | ||
drush8 -y user-add-role demoadmin "$DEMO_USER" | ||
|
||
## Setup userprotect | ||
drush8 -y en userprotect | ||
drush8 -y rmp authenticated userprotect.account.edit | ||
drush8 -y rmp authenticated userprotect.mail.edit | ||
drush8 -y rmp authenticated userprotect.pass.edit | ||
|
||
popd >> /dev/null | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
|
||
## uninstall.sh -- Delete config files and databases | ||
|
||
############################################################################### | ||
|
||
if [ -f "$CIVI_SETTINGS" ]; then | ||
chmod u+w $(dirname "$CIVI_SETTINGS") | ||
rm -f "$CIVI_SETTINGS" | ||
fi | ||
|
||
drupal_uninstall | ||
amp_uninstall |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
|
||
## download.sh -- Download Drupal and CiviCRM | ||
|
||
############################################################################### | ||
|
||
#[ -z "$CMS_VERSION" ] && CMS_VERSION=8.7.x | ||
[ -z "$CMS_VERSION" ] && CMS_VERSION=8.x-dev | ||
[ -z "$CIVI_VERSION" ] && cvutil_fatal "Must specify a CiviCRM version (--civi-ver X.Y)" | ||
[ "$CIVI_VERSION" == "master" ] && cvutil_fatal "Must specify a CiviCRM version (--civi-ver X.Y)" | ||
|
||
composer create-project drupal-composer/drupal-project:"$CMS_VERSION" "$WEB_ROOT" --no-interaction | ||
|
||
pushd "$WEB_ROOT" >> /dev/null | ||
composer require drupal/{devel,libraries} | ||
|
||
## NOTE: No support for CIVI_VERSION | ||
## NOTE: pear/log has a silly requirement for exactly 1.0.0 | ||
composer require roundearth/civicrm-composer-plugin civicrm/civicrm-setup:'dev-master as 0.2.1' civicrm/civicrm-{core,drupal-8}:~${CIVI_VERSION}.0 pear/pear_exception:'1.0.1 as 1.0.0' | ||
#composer require roundearth/civicrm-composer-plugin civicrm/civicrm-setup:'dev-master as 0.2.1' civicrm/civicrm-core:5.14.2 civicrm/civicrm-drupal-8:5.14.2 | ||
#composer require roundearth/civicrm-composer-plugin civicrm/civicrm-setup:'dev-master as 0.2.1' civicrm/civicrm-drupal-8 | ||
#composer require roundearth/civicrm-composer-plugin civicrm/civicrm-setup:dev-master civicrm/civicrm-drupal-8 | ||
popd >> /dev/null |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/bash | ||
|
||
## Transition: Old builds don't have "web/" folder. New builds do. | ||
## TODO: Simplify sometime after Dec 2019 | ||
## install.sh -- Create config files and databases; fill the databases | ||
[ -d "$WEB_ROOT/web" ] && CMS_ROOT="$WEB_ROOT/web" | ||
|
||
############################################################################### | ||
## Create virtual-host and databases | ||
|
||
amp_install | ||
|
||
############################################################################### | ||
## Setup Drupal (config files, database tables) | ||
|
||
drupal8_install | ||
DRUPAL_SITE_DIR=$(_drupal_multisite_dir "$CMS_URL" "$SITE_ID") | ||
pushd "${CMS_ROOT}/sites/${DRUPAL_SITE_DIR}" >> /dev/null | ||
# drush8 -y updatedb | ||
# drush8 -y en libraries | ||
|
||
cv core:install -f --cms-base-url="$CMS_URL" \ | ||
-m "settings.userFrameworkResourceURL=[cms.root]/libraries/civicrm" \ | ||
-m "siteKey=$CIVI_SITE_KEY" | ||
# -m "db=$CIVI_DB_DSN" ## For two DBs | ||
drush8 -y en civicrm | ||
|
||
## Setup demo user | ||
civicrm_apply_d8_perm_defaults | ||
drush8 -y user-create --password="$DEMO_PASS" --mail="$DEMO_EMAIL" "$DEMO_USER" | ||
drush8 -y user:role:add demoadmin "$DEMO_USER" | ||
popd >> /dev/null |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
|
||
## uninstall.sh -- Delete config files and databases | ||
|
||
############################################################################### | ||
|
||
if [ -f "$CIVI_SETTINGS" ]; then | ||
chmod u+w $(dirname "$CIVI_SETTINGS") | ||
rm -f "$CIVI_SETTINGS" | ||
fi | ||
|
||
drupal_uninstall | ||
amp_uninstall |
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 file was deleted.
Oops, something went wrong.
Oops, something went wrong.