From a1a520f066636d7b76171d0e46bec162bda19fe4 Mon Sep 17 00:00:00 2001 From: Matthew Grasmick Date: Tue, 9 Aug 2016 15:56:19 -0400 Subject: [PATCH] Making drush docroot smarter. --- index.md | 16 ++++++++++++++++ mkdocs.yml | 1 - phing/tasks/blt.xml | 5 ----- phing/tasks/properties.xml | 19 ++++++++++++++++++- template/drush.wrapper | 13 ++++++++++++- 5 files changed, 46 insertions(+), 8 deletions(-) diff --git a/index.md b/index.md index 53d71db33..87d600070 100644 --- a/index.md +++ b/index.md @@ -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. diff --git a/mkdocs.yml b/mkdocs.yml index 9644444d5..d39914259 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -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' diff --git a/phing/tasks/blt.xml b/phing/tasks/blt.xml index 6d2e90e29..8d79c3cb2 100644 --- a/phing/tasks/blt.xml +++ b/phing/tasks/blt.xml @@ -87,11 +87,6 @@ - - ${property.name} - ${${property.name}} - - - + + + + + + + + + + ${property.name} + + + + ${${property.name}} + + + + diff --git a/template/drush.wrapper b/template/drush.wrapper index db0b54e48..1d5c71e19 100755 --- a/template/drush.wrapper +++ b/template/drush.wrapper @@ -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