Skip to content

Conversation

@greg-1-anderson
Copy link
Member

First pass. Mostly done.

  • Ad-hoc usage is pretty consistent
  • Isolation tests are passing
  • Functional test fixtures (e.g. sut aliases) may still need adjusting
  • There may be a little more site alias code that can be deleted

@greg-1-anderson
Copy link
Member Author

Isolation tests are failing because a list needs to be sorted before the assertion.

* record.
*
* Sites may also define a special alias file self.site.yml, which
* may be stored in the drush/site-aliases directory relative to either
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this dir is now 'sites', not 'site-aliases'.

@weitzman weitzman changed the title Simplified site aliases Simplified site aliases. Fixes #3107 Nov 22, 2017
@greg-1-anderson greg-1-anderson force-pushed the simplified-site-aliases branch 2 times, most recently from 85bfbd5 to 446c1dc Compare November 23, 2017 16:51
… Require site aliases be stored in the 'sites' directory in each search location. No longer search directly in __ROOT__/drush et. al. Update 'drush init' to match (writes ~/drush/sites rather than ~/drush as the default home directory search location for site aliases).
@greg-1-anderson
Copy link
Member Author

I increased the search depth of site aliases to <=1 so that it would be possible to store related alias files together in a directory (e.g. ~/.drush/sites/pantheon/example.site.yml).

Currently, the behavior of the site:alias command is as follows:

Command Result
drush sa Show all sites from all site alias files that can be found
drush sa @example.dev Show just the dev environment of the example site
drush sa @example Show all of the environments of the example site

In the last example, environments defined in the file self.site.yml are also included for the first local site found in example.site.yml.

The next question is, should there be some way to run drush sa with an additional argument or option to show all of your aliases in a particular directory (e.g. all of your aliases for a certain isp)?

drush sa --group=dirname
drush sa --filter=pathregex
drush sa /regex/

Or perhaps some other notation?

…liases to be grouped together in directories.
@greg-1-anderson
Copy link
Member Author

All green! We could merge here and solve ^^ as a follow-on issue, or fix it up prior to merging as desired.

@weitzman
Copy link
Member

weitzman commented Nov 24, 2017 via email

@greg-1-anderson greg-1-anderson merged commit 86355ff into master Nov 24, 2017
@weitzman weitzman deleted the simplified-site-aliases branch December 13, 2019 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants