Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Making drush docroot smarter. #276

Merged
merged 1 commit into from
Aug 9, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 16 additions & 0 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@

Welcome to the BLT documentation site! Please read through the [Quick Start Guide](https://github.com/acquia/blt/INSTALL.md) to get started, and then browse the rest of this project's documentation in the sidebar.

# Documentation by role

* Developer
* [Onboarding](readme/onboarding.md): “how do I get up and running on project work?”
* [Repository architecture](readme/repo-architecture.md): “how is the code organized, and why?”
* [Running project tasks](readme/project-tasks.md): “how do I _____ on my local machine?”
* [Best practices](readme/best-practices.md): "how should I write code?"
* [Workflow](readme/dev-workflow.md): “how do I contribute my code to this project?”
* [Automated testing](tests/README.md): “how do I write / run them, and why should I care?”
* Technical Architect
* [Project Architecture document](readme/architecture.md)
* [Deploying to cloud](readme/deploy.md)
* [Release process](readme/release-process.md)
* [Setting up continuous integration](readme/ci.md)
* [Open source contribution](readme/os-contribution.md)

# Contributing to BLT

Please feel free to edit any of the pages in this documentation via the 'Edit on GitHub' link at the top right. If you would like to help improve BLT, please file issues via the GitHub issue queue. See [CONTRIBUTING.md](CONTRIBUTING.md) for contribution guidelines and instructions.
1 change: 0 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ pages:
- Installation & upgrade: 'INSTALL.md'
- Local development: 'readme/local-development.md'
- Project documentation:
- Overview: 'template/README.md'
- Developer:
- Onboarding: 'readme/onboarding.md'
- Repository architecture: 'readme/repo-architecture.md'
Expand Down
5 changes: 0 additions & 5 deletions phing/tasks/blt.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,6 @@
</if>
</target>

<target name="echo-property">
<echo>${property.name}</echo>
<echo level="warning">${${property.name}}</echo>
</target>

<!-- This target is meant to test BLT itself on TravisCI.
A few things to note:
- We do not run validate:* targets, since they can be run in parallel.
Expand Down
19 changes: 18 additions & 1 deletion phing/tasks/properties.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,23 @@
<echo>Executing commands against multisite "${multisite.name}"</echo>

<!-- Default drush alias. -->
<property name="drush.default_alias" value="self" override="false" logoutput="false"/>
<property name="drush.alias" value="${drush.default_alias}" override="false" logoutput="false"/>
<!--If alias is not self, then we do not specify the drush root. The drush alias itself should define this in its docroot key.-->
<if>
<not><equals arg1="${drush.alias}" arg2="self"/></not>
<then>
<property name="drush.root" value=""/>
</then>
</if>

<target name="echo-property" description="Echoes the value of a Phing property.">
<echo>${property.name}</echo>
<if>
<isset property="${property.name}"/>
<then>
<echo level="warning">${${property.name}}</echo>
</then>
</if>
</target>

</project>
13 changes: 12 additions & 1 deletion template/drush.wrapper
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,15 @@ if [ ! -f ${DIR}/vendor/bin/drush ]; then
composer install
fi

vendor/bin/drush.launcher --alias-path=${DIR}/drush/site-aliases "$@" -r ${DIR}/docroot
if [ ! -f ${DIR}/vendor/bin/blt ]; then
echo "BLT was not found in this project's vendor/bin directory."
echo "Attempting to run composer install. This takes a few minutes."
composer install
fi

DOCROOT=$(${DIR}/vendor/bin/blt echo-property -Dproperty.name=drush.root -S -e)
if [ -z "$DOCROOT" ]; then
vendor/bin/drush.launcher --alias-path=${DIR}/drush/site-aliases "$@"
else
vendor/bin/drush.launcher --alias-path=${DIR}/drush/site-aliases "$@" -r ${DIR}/docroot
fi