Skip to content

Commit

Permalink
Allow composer install with --classmap-authoritative during deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
tangrufus committed Jan 19, 2020
1 parent 9cd9a4a commit ec4b295
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
### Head
* Update `wp_cli_version` to 2.4.0 ([#1131](https://github.com/roots/trellis/pull/1131))
* Allow `composer install` without `--no-scripts` during deploy ([#1133](https://github.com/roots/trellis/pull/1133))
* Allow `composer install` with `--classmap-authoritative` during deploy ([#1132](https://github.com/roots/trellis/pull/1132))

### 1.3.0: December 7th, 2019
* Add `git_sha` and `release_version` to `.env` on deploy ([#1124](https://github.com/roots/trellis/pull/1124))
Expand Down
2 changes: 1 addition & 1 deletion deploy-hooks/build-before.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# chdir: "{{ project_local_path }}/web/app/themes/sage"
#
# - name: Install Composer dependencies
# command: composer install --no-ansi --no-dev --no-interaction --no-progress --optimize-autoloader --no-scripts
# command: composer install --no-ansi --no-dev --no-interaction --no-progress --optimize-autoloader --no-scripts --classmap-authoritative
# args:
# chdir: "{{ deploy_helper.new_release_path }}/web/app/themes/sage"
#
Expand Down
2 changes: 2 additions & 0 deletions roles/deploy/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ update_db_on_deploy: true

# Most scripts are used in development instead of remote servers. Use with caution.
composer_no_scripts: true
# Whether to autoload classes from classmap only.
composer_classmap_authoritative: true

# Helpers
project: "{{ wordpress_sites[site] }}"
Expand Down
1 change: 1 addition & 0 deletions roles/deploy/hooks/build-after.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@
- name: Install Composer dependencies
composer:
no_scripts: "{{ composer_no_scripts }}"
classmap_authoritative: "{{ composer_classmap_authoritative }}"
working_dir: "{{ deploy_helper.new_release_path }}"

0 comments on commit ec4b295

Please sign in to comment.