Skip to content

Commit 3ac76bb

Browse files
committed
Merge pull request #28 from gnat42/patch-1
Allow composer to be managed by other tools
2 parents 8da1721 + c11b0a5 commit 3ac76bb

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

defaults/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ symfony2_project_php_path: php
77
symfony2_project_keep_releases: 5
88
symfony2_project_clean_versioning: true
99
symfony2_project_console_opts: ''
10+
symfony2_project_maintain_composer: true
1011
symfony2_project_composer_opts: '--no-dev --optimize-autoloader --no-interaction'
1112
symfony2_fire_schema_update: false
1213
symfony2_fire_migrations: false

tasks/main.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,15 @@
4848
- name: Check if composer exists.
4949
stat: path={{symfony2_project_composer_path}}/composer.phar
5050
register: composer_file
51+
when: symfony2_project_maintain_composer == true
5152

5253
- name: Install composer.
5354
get_url: url=https://getcomposer.org/composer.phar dest={{symfony2_project_composer_path}} mode=0755 validate_certs=no
54-
when: composer_file.stat.exists == false
55+
when: symfony2_project_maintain_composer == true and composer_file.stat.exists == false
5556

5657
- name: Update composer if already exists.
5758
shell: "{{symfony2_project_composer_path}}/composer.phar selfupdate"
58-
when: composer_file.stat.exists == true
59+
when: symfony2_project_maintain_composer == true and composer_file.stat.exists == true
5960

6061
- name: Run composer install.
6162
shell: cd {{symfony2_project_root}}/releases/{{symfony2_project_release}} && export SYMFONY_ENV={{symfony2_project_env}} && {{symfony2_project_php_path}} {{symfony2_project_composer_path}}/composer.phar install {{symfony2_project_composer_opts}}

0 commit comments

Comments
 (0)