Skip to content

Commit

Permalink
Update build rules for shippable on the 8.x branch. (#3349)
Browse files Browse the repository at this point in the history
  • Loading branch information
greg-1-anderson authored Feb 4, 2018
1 parent 1f21434 commit 0af8928
Show file tree
Hide file tree
Showing 6 changed files with 108 additions and 11 deletions.
88 changes: 81 additions & 7 deletions docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,85 @@ In addition to the global Drush, it is recommended that Drupal 8 sites be [built

Drupal Compatibility
-----------------
Drush Version | Drush Branch | PHP | Compatible Drupal versions | Code Status
------------- | --------- | --- | -------------------------- | -----------
Drush 9 | [master](https://travis-ci.org/drush-ops/drush) | 5.5+ | D7, D8 | <img src="https://travis-ci.org/drush-ops/drush.svg?branch=master">
Drush 8 | [8.x](https://travis-ci.org/drush-ops/drush) | 5.4.5+ | D6, D7, D8 | <img src="https://travis-ci.org/drush-ops/drush.svg?branch=8.x">
Drush 7 | [7.x](https://travis-ci.org/drush-ops/drush) | 5.3.0+ | D6, D7 | <img src="https://travis-ci.org/drush-ops/drush.svg?branch=7.x">
Drush 6 | [6.x](https://travis-ci.org/drush-ops/drush) | 5.3.0+ | D6, D7 | Unsupported
Drush 5 | [5.x](https://travis-ci.org/drush-ops/drush) | 5.2.0+ | D6, D7 | Unsupported
!!! note

Drush 9 only supports one install method. It requires that your Drupal 8 site be built with Composer and Drush be listed as a dependency.

See the [Drush 8 docs](http://docs.drush.org/en/8.x) for installing prior versions of Drush.

Install a site-local Drush and Drush Launcher.
-----------------
1. It is recommended that Drupal 8 sites be [built using Composer, with Drush listed as a dependency](https://github.com/drupal-composer/drupal-project). That project already includes Drush in its composer.json. If your Composer project doesn't yet depend on Drush, run `composer require drush/drush` to add it.
1. To be able to call `drush` from anywhere, install the [Drush Launcher](https://github.com/drush-ops/drush-launcher). That is a small program which listens on your $PATH and hands control to a site-local Drush that is in the /vendor directory of your Composer project. If you skip this step, run Drush from Drupal root via `../vendor/bin/drush`. In that case Drush's bash integration and custom prompt won't work.
1. Run `drush init`. This edits ~/.bashrc so that Drush's custom prompt and bash integration are active.
1. See [Usage](http://docs.drush.org/en/master/usage/) for details on using Drush.
1. To use a non-default PHP, [edit ~/.bashrc so that the desired PHP is in front of your $PATH](http://stackoverflow.com/questions/4145667/how-to-override-the-path-of-php-to-use-the-mamp-path/10653443#10653443). If that is not desirable, you can change your PATH for just one request: `PATH=/path/to/php:$PATH` drush status ...`

!!! note

Drush 9 cannot run commandfiles from Drush 8 and below (e.g. example.drush.inc). See our [guide on porting commandfiles](https://weitzman.github.io/blog/port-to-drush9). Also note that alias and config files use a new .yml format in Drush 9.

Drupal Compatibility
-----------------
<table>
<tr>
<th> Drush Version </th>
<th> Drush Branch </th>
<th> PHP </th>
<th> Compatible Drupal versions </th>
<th> Code Style </th>
<th> Isolation Tests </th>
<th> Functional Tests </th>
</tr>
<tr>
<td> Drush 9 </td>
<td> <a href="https://travis-ci.org/drush-ops/drush">master</a> </td>
<td> 5.6+ </td>
<td> D8.4+ </td>
<td align="center">
<img src="https://api.shippable.com/projects/5507addd5ab6cc1352a213b5/badge?branch=master" />
</td>
<td align="center">
<img src="https://travis-ci.org/drush-ops/drush.svg?branch=master" />
</td>
<td align="center">
<img src="https://circleci.com/gh/drush-ops/drush.svg?style=shield" />
</td>
</tr>
<tr>
<td> Drush 8 </td>
<td> <a href="https://travis-ci.org/drush-ops/drush">8.x</a> </td>
<td> 5.4.5+ </td>
<td> D6, D7, D8.3- </td>
<td align="center">
<img src="https://circleci.com/gh/drush-ops/drush.svg?branch=8.x&style=shield" />
</td>
<td align="center">
-
</td>
<td align="center">
<img src="https://travis-ci.org/drush-ops/drush.svg?branch=8.x" />
</td>
</tr>
<tr>
<td> Drush 7 </td>
<td> <a href="https://travis-ci.org/drush-ops/drush">7.x</a> </td>
<td> 5.3.0+ </td>
<td> D6, D7 </td>
<td colspan="3" align="center"> Unsupported </td>
</tr>
<tr>
<td> Drush 6 </td>
<td> <a href="https://travis-ci.org/drush-ops/drush">6.x</a> </td>
<td> 5.3.0+ </td>
<td> D6, D7 </td>
<td colspan="3" align="center"> Unsupported </td>
</tr>
<tr>
<td> Drush 5 </td>
<td> <a href="https://travis-ci.org/drush-ops/drush">5.x</a> </td>
<td> 5.2.0+ </td>
<td> D6, D7 </td>
<td colspan="3" align="center"> Unsupported </td>
</tr>
</table>
22 changes: 22 additions & 0 deletions shippable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
language: php

php:
- "7.1"

build:
ci:
# Set up php configuration
- echo 'mbstring.http_input = pass' >> $HOME/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- echo 'mbstring.http_output = pass' >> $HOME/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- echo 'memory_limit = -1' >> $HOME/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- echo 'sendmail_path = /bin/true' >> $HOME/.phpenv/versions/$(phpenv version-name)/etc/php.ini
# Disable xdebug for faster Composer operations
# - rm $HOME/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini
# Install / update our tools
# - composer self-update
# - composer install --prefer-dist --no-interaction
# Run lint check
# - composer lint
# No tests here
- echo 'No shippable tests on this branch'

3 changes: 2 additions & 1 deletion tests/generateMakeTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php

namespace Unish;
use Webmozart\PathUtil\Path;

/**
* Generate makefile tests
Expand Down Expand Up @@ -78,7 +79,7 @@ function _testGenerateMake($module, $theme) {
$this->assertEquals($expected, $actual);

// Download a module to a 'contrib' directory to test the subdir feature
mkdir($this->webroot() + '/sites/all/modules/contrib');
$this->mkdir(Path::join($this->webroot(). '/sites/all/modules/contrib'));
$this->drush('pm-download', array('libraries'), array('destination' => 'sites/all/modules/contrib') + $options);
$this->drush('pm-enable', array('libraries'), $options);
$makefile = UNISH_SANDBOX . '/dev.make.yml';
Expand Down
2 changes: 1 addition & 1 deletion tests/makefiles/file.make
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ core = 6.x
api = 2

libraries[drush_make][download][type] = "file"
libraries[drush_make][download][url] = "http://drupalcode.org/project/drush_make.git/blob_plain/8d4e770:/README.txt"
libraries[drush_make][download][url] = "https://cgit.drupalcode.org/drush_make/plain/README.txt?h=6.x-3.x&id=8d4e770aeb1cfc180d48b76b70f9bf5ee250eade"
libraries[drush_make][download][filename] = "README.txt"

; Single file download
Expand Down
2 changes: 1 addition & 1 deletion tests/makefiles/md5-fail.make
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ core = 6.x
api = 2

libraries[drush_make][download][type] = "file"
libraries[drush_make][download][url] = "http://drupalcode.org/project/drush_make.git/blob_plain/8d4e770:/README.txt"
libraries[drush_make][download][url] = "https://cgit.drupalcode.org/drush_make/plain/README.txt?h=6.x-3.x&id=8d4e770aeb1cfc180d48b76b70f9bf5ee250eade"
libraries[drush_make][download][filename] = "README.txt"
libraries[drush_make][download][md5] = "- fail -"
2 changes: 1 addition & 1 deletion tests/makefiles/md5-succeed.make
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ core = 6.x
api = 2

libraries[drush_make][download][type] = "file"
libraries[drush_make][download][url] = "http://drupalcode.org/project/drush_make.git/blob_plain/8d4e770:/README.txt"
libraries[drush_make][download][url] = "https://cgit.drupalcode.org/drush_make/plain/README.txt?h=6.x-3.x&id=8d4e770aeb1cfc180d48b76b70f9bf5ee250eade"
libraries[drush_make][download][filename] = "README.txt"
libraries[drush_make][download][md5] = "c8968d801a953b9ea735364d6f3dfabc"

0 comments on commit 0af8928

Please sign in to comment.