If we add a .make file to this module then sites made through drush_make that include colorbox will automatically download the external colorbox library.

In the next post is a patch to do this. It adds a new file in the drush folder called colorbox.make.

CommentFileSizeAuthor
#1 colorbox-839580.patch537 bytesnicholas.alipaz

Comments

nicholas.alipaz’s picture

StatusFileSize
new537 bytes

Here is the patch

--
Los Angeles Web Design and development for Drupal.

frjo’s picture

Status: Active » Fixed

Nice! Committed to 6-dev.

Is the format the same for D7 so I can commit the same file there and just change the "core = 6.x" part?

nicholas.alipaz’s picture

actually, I had hoped that drush_make would be able to find that .make file in the drush subdirectory. It seems that the file is not unfortunately found. I just tested it using a drush make that did a cvs checkout of your most recent commit. So the file will need to move into the project's base path unfortunately. Sorry for this issue.

As for D7, I would think it would be the same since drush_make & drush only have one version for drupal.

Reference:
#644812: Recursion should not execute all makefiles found in a project

nicholas.alipaz’s picture

Status: Fixed » Needs work

marking "needs work" until the file gets placed in the correct path.

frjo’s picture

Status: Needs work » Fixed
nicholas.alipaz’s picture

Just an update to say everything looks like it is working correctly in the 6.x branch with the new make file, here is a sample of what my console looked like when I ran the make I have:

nicholas@alipaz-asus:~/workspace/testing$ drush make mysite.make
Make new site in the current directory? (y/n): y
Project information for jquery_update retrieved.  [ok]
Project information for drupal retrieved.  [ok]
drupal downloaded from http://ftp.drupal.org/files/projects/drupal-6.17.tar.gz.  [ok]
jquery_update downloaded from http://ftp.drupal.org/files/projects/jquery_update-6.x-2.0-alpha1.tar.gz.  [ok]
colorbox export from contributions/modules/colorbox.  [ok]
Found makefile: colorbox.make
colorbox downloaded from http://colorpowered.com/colorbox/colorbox.zip.  [ok]

Here is my example working mysite.make file, it downloads drupal core, jQuery update 2.0-alpha1 and colorbox module/library:

; Core version
core = 6.x
projects[] = drupal

; Most recent alpha of jquery update since colorbox requires it and we also want 1.3 and higher anyhow
projects[jquery_update] = 2.0-alpha1
; CVS checkout of colorbox
projects[colorbox][type] = module
projects[colorbox][download][type] = cvs
projects[colorbox][download][module] = contributions/modules/colorbox
projects[colorbox][download][revision] = DRUPAL-6--1

Once there is an official release of the colorbox module with colorbox.make in it or the .make file gets packaged into dev (may already be) then using cvs won't be necessary of course. Just projects[] = colorbox will be enough.

Status: Fixed » Closed (fixed)

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

eugenmayer’s picture

Title: Add drush make file to download external library » Make file broken with drush make 2.0 - remove it please
Category: feature » bug
Status: Closed (fixed) » Active

With the current drush make 2.0 the make file of colorbox is broken. Please remove the make file out of the module or the release.
In general it can be a nice idea, but you take away the responsibility of the developer.

E.g. i cant _ever_ chose my own colorbox lib version when i include your module this way into my make files. Your version is forced and even worse, the make process errors. Please just seperate the module and the library. If someone uses drush make he know how to add a library himself, no need to force him. If someone is a starter / beginner and you want to ease up installation, i just can tell you, that person will neither use drush, nor ever use a makefile.

Dont forget that those make files are use recursivly, so if the colorbox (module) is part of a bigger make file, the library is forced. When you make file is not, like now 100% up-to-date or uses an older lib, or whatever, the whole process brakes.

just test this

api=2
core = 6.x
projects[] = drupal

projects[colorbox][type]="module"
projects[colorbox][version]="1.0-beta9"
projects[colorbox][download][type]="get"
projects[colorbox][download][url]="http://ftp.drupal.org/files/projects/colorbox-6.x-1.0-beta9.tar.gz"

projects[colorbox][location]="http://updates.drupal.org/release-history"

Thanks!

frjo’s picture

Status: Active » Needs review

Renamed them colorbox.make.example for the time being. Thanks for the report.

frjo’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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