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
- Write a patch
- Review and RTBC
- 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.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | build_sh_requires-2305089-5.patch | 765 bytes | mparker17 |
Comments
Comment #1
mparker17Whoops... empty code tag broke listing
Comment #2
mparker17I'll work on this...
Comment #3
dsnopekActually, 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?
Comment #4
mglamanThe 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.
Comment #5
mparker17Turns out
drush help $command_that_might_not_be_validreturns 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!
Comment #6
mglamanWas 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.
Comment #8
dsnopekThanks, @mparker17, for the patch! And thanks, @mglaman, for the review (I wouldn't have committed it this quickly without it ;-)).
Committed!
Comment #10
mparker17Unassigning myself, now that this is Closed (fixed).