Problem/Motivation

When I try to run build.sh on my local machine, it errors out because it's missing the verify-makefile command:

mparker17@mcomp7:(drupal)/panopoly (7.x-1.x ✓) % ./build.sh /Users/mparker17/panopoly
 ___   ___   ___
|___| |   | |   |
 ___  |   | |___|
|   | |   |  ___ 
|   | |___| |___|
|   |  _________ 
|___| |_________|

=================
    Panopoly     
=================

This command can be used to build the distribution.

  [1] Build distribution at /Users/mparker17/panopoly (in release mode)
  [2] Build distribution at /Users/mparker17/panopoly (in development mode)

Selection: 1
Building Panopoly distribution...
Verifying make...
The drush command 'verify-makefile' could not be found.  Run `drush cache-clear drush` to clear the commandfile cache if you have installed new extensions. [error]
A Drupal installation directory could not be found [error]

After a brief chat in IRC with @mglaman and @dsnopek, we found this is because I hadn't installed the Drupal.org drush project on my local machine.

A quick grep shows the only mention of it is in the travis build script:

mparker17@mcomp7:(drupal)/panopoly (7.x-1.x ✓) % rgrep 'drupalorg_drush' .
./scripts/travis-ci.sh:32:  drush dl -y drupalorg_drush-7.x-1.x-dev --destination=$HOME/.drush

I feel like this should be documented somewhere.

Proposed resolution

There doesn't appear to be any existing prose documentation on the build.sh script...

mparker17@mcomp7:(drupal)/panopoly (7.x-1.x ✓) % rgrep -w 'build.sh' .
mparker17@mcomp7:(drupal)/panopoly (7.x-1.x ✓) %

... so I propose adding documentation and/or a check to the build.sh script.

Remaining tasks

  1. Write a patch
  2. Review and RTBC
  3. Commit

User interface changes

When running build.sh, it prints a message to tell you to install the Drupal.org drush project (ideally, if the verify-makefile command does not exist, ideally before erroring out).

API changes

None.

CommentFileSizeAuthor
#5 build_sh_requires-2305089-5.patch765 bytesmparker17

Comments

mparker17’s picture

Issue summary: View changes

Whoops... empty code tag broke listing

mparker17’s picture

Assigned: Unassigned » mparker17

I'll work on this...

dsnopek’s picture

Actually, that module isn't strictly required to do the build. It's a good idea to run it for sure, but you can build without it. Maybe we could detect if it's installed and just issue a warning if it isn't?

mglaman’s picture

The build failed for me, always, without the command. The build script invokes "drush verify-makefile". I could never build Panopoly without commenting out that line until I downloaded command from D.o.

mparker17’s picture

Status: Active » Needs review
StatusFileSize
new765 bytes

Turns out drush help $command_that_might_not_be_valid returns 0 (i.e.: normal CLI exit code i.e.: success) if the command is available and 1 (i.e.: abnormal CLI exit code i.e.: an error) if it's not, so it's easy to script!

Feedback welcome!

mglaman’s picture

Status: Needs review » Reviewed & tested by the community

Was able to run build script with the drupalorg_drush project missing which provides the make verify. Really the only ones who need make verify are developers to ensure it passes Drupal.org whitelisting.

  • dsnopek committed e901058 on 7.x-1.x authored by mparker17
    Issue #2305089 by mparker17: Fixed build.sh requires drupalorg_drush but...
dsnopek’s picture

Status: Reviewed & tested by the community » Fixed

Thanks, @mparker17, for the patch! And thanks, @mglaman, for the review (I wouldn't have committed it this quickly without it ;-)).

Committed!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

mparker17’s picture

Assigned: mparker17 » Unassigned

Unassigning myself, now that this is Closed (fixed).