It is a fairly common situation to have to deploy from a specific directory in some global project checkout without git submodules or similar mechanisms.
In that case, the "file" download mechanism requires using a packaged release which will be expanded. It would be simpler to directly allow use of a local directory in its actual state.
The single download options could be:
- path: points to the relative (to current directory) or absolute path to the source directory
Another possibly useful option later on would also be to use a symlink instead of a copy.
This is somehow related with #1232466: Get directories from the local filesystem in makefiles, but does not address exactly the same issue. The other issue is about subdirectories layout.
Comments
Comment #1
fgmSuggestion implementation. Surprisingly simple.
Comment #2
lotyrin commentedComment #3
jhedstromI'd like to see a test for this before it goes in.
Comment #4
fgmAny idea how to write tests for something of that kind ? Would that be a makeMakefileCase::testMakeDirectory() method or something more ?
FWIW, running the PHPunit tests in Drush latest version over SQLite returns 19 failures over the 65 tests and 329 assertions.
Comment #5
jhedstromNot positive this would work, but a sample directory could be added to
tests/makefiles/local_dir, with the simplest possible module, perhaps just a .info file. Then a makefile would be added totests/makefilesthat points to the relative path oflocal_dir, and run by adding a new method tomakeTest.php.Comment #6
fgmHi jhedstrom: my question wasn't so much about how to test the mechanism as it was about how to run these drush tests: as I wrote in november, when I run the tests in PHPUnit, they are far from passing, and I doubt this is really as it should be. Or is it ?
Comment #7
jhedstromI run the make tests using
phpunit --filter=testMake .from within thetestsdirectory, and those are all passing for me at the moment. I haven't run the full test suite in a while, but you're right, it should be passing entirely.Comment #8
greg.1.anderson commentedThe whole suite is passing for me, except for quickDrupalCase::testQuickDrupal, which has been failing on my machine for a while now. Maybe it's just me; haven't looked into it. The rest of the suite all passes.
Update: I run the test suite with mysql; not sure how it's doing with sqlite nowadays.
Comment #9
greg.1.anderson commentedThis issue was marked
closed (won't fix)because Drush has moved to Github.If this feature is still desired, you may copy it to our Github project. For best results, create a Pull Request that has been updated for the master branch. Post a link here to the PR, and please also change the status of this issue to
closed (duplicate).Please ask support questions on Drupal Answers.
Comment #9.0
greg.1.anderson commentedreference existing related issue