Skip to content

Commit

Permalink
Removing more composer update functionality.
Browse files Browse the repository at this point in the history
  • Loading branch information
grasmash committed Feb 28, 2017
1 parent d135f55 commit 9cb8f04
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 39 deletions.
30 changes: 3 additions & 27 deletions readme/updating-blt.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,39 +21,15 @@ If you are already using BLT via Composer, you can update to the latest version

### Modifying update behavior

By default BLT will modify your project's composer.json to conform with the [upstream composer.json template](https://github.com/acquia/blt/blob/8.x/template/composer.json). If you'd like to prevent a specific package or key in composer.json from being modified, use the `composer-exclude-merge` option:
By default BLT will modify a handful of files in your project to conform to the [upstream template](https://github.com/acquia/blt/blob/8.x/template). If you'd like to prevent this, set `extra.blt.update` to `false` in `composer.json`:

"extra": {
"blt": {
"update": true,
"composer-exclude-merge": {
"require": [
"drupal/acsf",
"drupal/acquia_connector",
"drupal/memcache",
"drupal/search_api",
"drupal/search_api_solr"
],
"require-dev": "*"
}
"update": true
}
}

This would prevent the merging of any upstream updates to the composer.json configuration for a handful of modules in `require` and all packages in `require-dev`.

A few other examples of valid usage:

"extra": {
"blt": {
"update": false,
}
}
"extra": {
"blt": {
"update": true,
"composer-exclude-merge": "*"
}
}
Please not that if you choose to do this, it is your responsibility to track upstream changes. This is very likely to cause issues when you upgrade BLT to a new version.

## Updating from a non-Composer-managed (very old) version

Expand Down
12 changes: 0 additions & 12 deletions src/Composer/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,18 +133,6 @@ protected function executeBltUpdate($version) {
}
elseif ($options['blt']['update']) {
$this->io->write('<info>Updating BLT templated files...</info>');

// Rsyncs, updates composer.json, project.yml, executes scripted updates for version delta.
$pre_composer_json = md5_file($this->getRepoRoot() . DIRECTORY_SEPARATOR . 'composer.json');
$success = $this->executeCommand('blt update', [], TRUE);
if (!$success) {
$this->io->write("<error>BLT update script failed! Run `blt update -verbose` to retry.</error>");
}
$post_composer_json = md5_file($this->getRepoRoot() . DIRECTORY_SEPARATOR . 'composer.json');

if ($pre_composer_json != $post_composer_json) {
$this->io->write('<error>Your composer.json file was modified by BLT, you MUST run "composer update" to re-process and update dependencies.</error>');
}
}
else {
$this->io->write('<comment>Skipping update of BLT templated files</comment>');
Expand Down

0 comments on commit 9cb8f04

Please sign in to comment.