Information for: DEVELOPERS   PARTNERS

Committing dependencies

Composer’s official stance is you must not commit dependencies.

On occasion, extenuating circumstances require you to commit your dependencies. For Acquia BLT, you can commit your dependencies by using the following steps:

  1. Change 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
    
  2. Create a custom deploy.exclude_file and reference its location in your blt.yml file:

    mkdir blt/deploy && cp vendor/acquia/blt/scripts/blt/deploy/deploy-exclude.txt blt/deploy/deploy-exclude.txt
    
    deploy:
      exclude_file: ${repo.root}/blt/deploy/deploy_exclude.txt
    
  3. Change 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
    
  4. Configure deploy.build-dependencies to false in your blt/blt.yml file:

    deploy:
      build-dependencies: false
    
  5. 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.