Would this be an interesting new feature for drush make? We could the project manager functions to retrieve upgrade information and then use that to update version numbers for all modules in a makefile...

Comments

helmo’s picture

helmo’s picture

Project: Drush Make » Drush
Version: 6.x-3.x-dev »
Component: Code » Make

[ Powered by #1115636: Issue Macros and Templates - Drush Make]

Drush make is being merged into drush core (discussed in issue:#1310130: Put drush make in drush core)
This means that the issue queue is also moving. The drush queue has a component 'Make' especially for drush_make.

More information will be posted on the drush_make and drush project pages.

greg.1.anderson’s picture

I am again going to vote that this should be "won't fix" for the same reasons given here.

moshe weitzman’s picture

make-generate better be very very good at its job in order for that to be a replacement. it isn't good if there are spurious diffs because re-make is lossy. i really haven't used make enough yet to know more.

greg.1.anderson’s picture

Yes, good point. Libraries, for one, are hard to reconstruct, as their source URL and other attributes are not recorded.

greg.1.anderson’s picture

Assigned: Unassigned » greg.1.anderson

I propose that make-generate be enhanced to run in any of three modes:

1. Generate from an existing site (current implementation)
2. Generate from a makefile (no installed site available)
3. Generate from info from both an existing site, and the makefile that generated that site

Drush can use pm-releases in the second mode to get the current version information for the provided makefile in the second mode. In the third mode, the provided makefile will be largely (but not completely) ignored, as the module enabled/disabled status of the current site will take precedence. The provided makefile will be consulted as needed, e.g. to provide the download URL for modules where that information is not available.

ergonlogic’s picture

Version: » 8.x-6.x-dev

I posted a patch in #1212686: Create a versioned make file when running drush make with option --make-generate that might be helpful in this issue too.

ergonlogic’s picture

The latest patch in #1212686: Create a versioned make file when running drush make with option --make-generate should make this issue relatively easy.

Re. #6, I'm not sure that I understand what (3) is referring to... is it basically #1212686: Create a versioned make file when running drush make with option --make-generate or something else entirely?

greg.1.anderson’s picture

I edited #6 for clarity. If a user generates a site with a makefile, and then later updates the site with pm-updatecode, it would be useful to run a command to generate an up-to-date makefile, using information from the original makefile (which may not be available using just the installed site, per #4), and information from the current site (exactly what versions of everything were installed at the time pm-updatecode was ran).

ergonlogic’s picture

Status: Active » Needs review
StatusFileSize
new17.12 KB

Okay, well then I think (3) from #6 (as much as it'd be an interesting feature) is actually out of scope for this issue. At least, as it was initially described.

Here's a patch that builds on #1212686: Create a versioned make file when running drush make with option --make-generate. It allows both versioned and updated makefiles. It also adds a 'no-build' option, so that it can generate these without actually having to build a codebase.

greg.1.anderson’s picture

Yes, I agree #6 (3) is a separate issue. Thanks for working on this. Code here & in other issue looks good, but I haven't had time to try it or review it carefully.

ergonlogic’s picture

I figured to bump this issue, since it's been a couple weeks. Bit rot may require a re-roll of the patch, so let me know if it doesn't apply cleanly.

Also, the patch is really only about half it's apparent size, since half of it is just moving a couple functions out of generate.make.inc and into their own file, to allow the to be called separately.

greg.1.anderson’s picture

Assigned: greg.1.anderson » Unassigned

I'm still absolutely swamped, for weeks to come. Maybe Jonhattan can review? Code looks good overall.

ergonlogic’s picture

Status: Needs review » Closed (duplicate)

Opened a new issue on github: https://github.com/drush-ops/drush/issues/53