Created
December 28, 2016 16:31
-
-
Save mlutfy/27afbe43e027554de7e2fe98781d60d5 to your computer and use it in GitHub Desktop.
create-platform.sh
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/bash | |
# We try to find the latest release when possible. | |
CIVICRM_VERSION=`php -r '$versions = json_decode(file_get_contents("https://latest.civicrm.org/versions.json")); $last = array_pop($versions->{4.6}->releases); print $last->version;'` | |
CKEDITOR_VERSION="4.5.6" | |
# http://drupal.stackexchange.com/questions/133925/find-latest-drupal-version-number/133948#133948 | |
# (and remove spaces) | |
DRUPAL_MAJOR="7" | |
DRUPAL_VERSION=`drush pm-releases drupal-${DRUPAL_MAJOR} --fields=Release --field-labels=0 | grep -v dev | grep 7. | awk '{print $1}'` | |
git checkout origin/master | |
git pull | |
wget --quiet http://ftp.drupal.org/files/projects/drupal-${DRUPAL_VERSION}.tar.gz | |
tar zxf drupal-${DRUPAL_VERSION}.tar.gz | |
rsync -Pra drupal-7.*/* . | |
mv drupal-7.*/.htaccess . | |
rm -f drupal-${DRUPAL_VERSION}.tar.gz | |
rm -fr drupal-${DRUPAL_VERSION} | |
rm -f INSTALL.* | |
git add . | |
git commit -m "Drupal core update: ${DRUPAL_VERSION}" || true | |
update_drupal_module() { | |
drush dl --default-major=7 --destination=sites/all/modules/contrib $1 -y | |
git add . | |
git commit -m "Drupal module update: $1" || true | |
} | |
update_drupal_module admin_menu | |
update_drupal_module advanced_help | |
update_drupal_module better_exposed_filters | |
update_drupal_module block_class-7.x-2.x | |
update_drupal_module ctools | |
update_drupal_module entity | |
update_drupal_module google_analytics-7.x-2.x | |
update_drupal_module globalredirect-7.x-1.x-dev | |
update_drupal_module i18n | |
update_drupal_module i18nviews-7.x-3.x | |
update_drupal_module imce-7.x-1.x | |
update_drupal_module imce_mkdir-7.x-1.x | |
update_drupal_module imce_wysiwyg-7.x-1.x | |
update_drupal_module jquery_update | |
update_drupal_module l10n_update | |
update_drupal_module libraries-7.x-2.x | |
update_drupal_module mailsystem-7.x-2.x-dev | |
update_drupal_module metatag | |
update_drupal_module mimemail | |
update_drupal_module node_clone | |
update_drupal_module options_element | |
update_drupal_module panels | |
update_drupal_module paranoia | |
update_drupal_module pathauto | |
# update_drupal_module pathauto_persist # fusionné dans pathauto depuis pathauto 1.3 | |
update_drupal_module rules-7.x-2.x | |
update_drupal_module service_links | |
update_drupal_module token-7.x-1.x | |
update_drupal_module views | |
update_drupal_module views_slideshow-7.x-3.x | |
update_drupal_module webform | |
update_drupal_module webform_civicrm | |
update_drupal_module webform_bt_layout | |
update_drupal_module webform_layout | |
update_drupal_module wysiwyg-7.x-2.x | |
update_drupal_module variable | |
update_drupal_module xmlsitemap | |
pwd | |
pushd sites/all/libraries | |
wget --quiet http://download.cksource.com/CKEditor/CKEditor/CKEditor%204.5.6/ckeditor_${CKEDITOR_VERSION}_standard.zip | |
unzip -f ckeditor_${CKEDITOR_VERSION}_standard.zip | |
rm ckeditor_${CKEDITOR_VERSION}_standard.zip | |
git add . | |
git commit -m "CkEditor ${CKEDITOR_VERSION}" || true | |
popd | |
pwd | |
pushd sites/all/modules | |
wget --quiet https://download.civicrm.org/civicrm-${CIVICRM_VERSION}-drupal.tar.gz | |
tar zxfv civicrm-${CIVICRM_VERSION}-drupal.tar.gz | |
rm civicrm-${CIVICRM_VERSION}-drupal.tar.gz | |
git add . | |
git commit -m "CiviCRM ${CIVICRM_VERSION}" || true | |
popd | |
git push origin master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment