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

fgm’s picture

Status: Active » Needs review
StatusFileSize
new1.78 KB

Suggestion implementation. Surprisingly simple.

lotyrin’s picture

Status: Needs review » Reviewed & tested by the community
jhedstrom’s picture

Status: Reviewed & tested by the community » Needs work

I'd like to see a test for this before it goes in.

fgm’s picture

Any 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.

jhedstrom’s picture

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

Not 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 to tests/makefiles that points to the relative path of local_dir, and run by adding a new method to makeTest.php.

fgm’s picture

Hi 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 ?

jhedstrom’s picture

I run the make tests using phpunit --filter=testMake . from within the tests directory, 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.

greg.1.anderson’s picture

The 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.

greg.1.anderson’s picture

Status: Needs work » Closed (won't fix)
Issue tags: +Needs migration

This 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.

greg.1.anderson’s picture

Issue summary: View changes

reference existing related issue