diff --git a/phing/build.yml b/phing/build.yml index 4941f91a9c..483406617b 100644 --- a/phing/build.yml +++ b/phing/build.yml @@ -18,6 +18,7 @@ composer: bin: ${repo.root}/vendor/bin deploy: + build-dependencies: true dir: ${repo.root}/deploy exclude_file: ${blt.root}/phing/files/deploy-exclude.txt gitignore_file: ${blt.root}/phing/files/.gitignore diff --git a/phing/tasks/deploy.xml b/phing/tasks/deploy.xml index abbd2d176f..ba080aeb72 100644 --- a/phing/tasks/deploy.xml +++ b/phing/tasks/deploy.xml @@ -87,14 +87,25 @@ - - - - - - - - + + + + Rebuilding composer dependencies without require-dev. + + + + + + + + + + + Dependencies will not be built because deploy.build-dependencies is not enabled. + You should define a custom deploy.exclude_file to ensure that dependecies are copied from the root repository. + + + diff --git a/readme/committing-dependencies.md b/readme/committing-dependencies.md new file mode 100644 index 0000000000..c3be36ebda --- /dev/null +++ b/readme/committing-dependencies.md @@ -0,0 +1,45 @@ +# Committing Dependencies + +Composer's official stance is that you should not commit dependencies. + +However, there are sometimes extenuating circumstances that require you to commit your dependencies. In this case, you can commit your dependencies by following these steps: + +* Modify your project's `.gitignore` by removing the following lines: + + docroot/core + docroot/modules/contrib + docroot/themes/contrib + docroot/profiles/contrib + docroot/libraries + drush/contrib + vendor + +* Create a custom deploy.exclude_file and reference its location in your project.yml + + mkdir blt/deploy && cp vendor/acquia/blt/scripts/files/deploy-exclude.txt blt/deploy/deploy-exclude.txt + + deploy: + exclude_file: ${repo.root}/blt/deploy/deploy_exclude.txt + +* Modify your custom deploy_exclude.txt file by removing the following lines: + + /docroot/core + /docroot/libraries/contrib + /docroot/modules/contrib + /docroot/sites/*/files + /docroot/sites/*/private + /docroot/themes/contrib + /drush/contrib + /vendor + +* Set `deploy.build-dependencies` to `false` in your `project.yml` file: + + deploy: + build-dependencies: false + +* Commit your changes and dependencies: + + git add -A + git commit -m 'Committing dependencies.' + +Your dependencies will now be committed to your repository and copied to your deployment artifact.