Monkey-patch drush module for puppet 4

The puppet-drush module that the puppet-drupal module depends on has
some quirks on puppet 4. First, with the new ordering algorithm, it's
not guaranteed that the drush repo and the composer installation will
happen in the same order as before. We can fix that without touching the
drush module itself by creating resource orderings from the
drupal::drush class. Second, on puppet 3 the empty string '' was
interpreted as falsey, so you could expect `if '' {}` to evaluate as
false. On puppet 4, it's interpreted as truthy, and for the drush module
using '' as the default for the git_tag parameter causes the drush
$git_ref variable to be set to the empty string which causes the module
to stay on the master branch instead of checking out the 6.x branch.
There's no semantic difference between the git_branch and git_tag
parameter, so we'll just set git_tag to the same as git_branch.

Change-Id: I3acbda4edd546b4f145c9991f18ca80bb3e2171e
This commit is contained in:
Colleen Murphy 2018-07-20 14:01:21 +02:00 committed by Clark Boylan
parent 5870b57528
commit fa22ff35e3
1 changed files with 4 additions and 0 deletions

View File

@ -27,8 +27,12 @@ define drupal::drush (
$drushdsdtar = 'https://github.com/mkissam/drush-dsd/archive/v0.10.tar.gz',
) {
# Fix the resource ordering in the drush::git::drush class
Drush::Git['https://github.com/drush-ops/drush.git'] -> Exec['Install composer']
class {'::drush::git::drush':
git_branch => '6.x',
git_tag => '6.x',
}
file { '/usr/share/drush/commands/dsd':