Skip to content

Commit

Permalink
Merge pull request #28 from gnat42/patch-1
Browse files Browse the repository at this point in the history
Allow composer to be managed by other tools
  • Loading branch information
maschmann committed Oct 13, 2015
2 parents 8da1721 + c11b0a5 commit 3ac76bb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ symfony2_project_php_path: php
symfony2_project_keep_releases: 5
symfony2_project_clean_versioning: true
symfony2_project_console_opts: ''
symfony2_project_maintain_composer: true
symfony2_project_composer_opts: '--no-dev --optimize-autoloader --no-interaction'
symfony2_fire_schema_update: false
symfony2_fire_migrations: false
5 changes: 3 additions & 2 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,15 @@
- name: Check if composer exists.
stat: path={{symfony2_project_composer_path}}/composer.phar
register: composer_file
when: symfony2_project_maintain_composer == true

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

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

- name: Run composer install.
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}}
Expand Down

0 comments on commit 3ac76bb

Please sign in to comment.