Split build into smaller targets

This commit is contained in:
Thibaud Fabre
2016-09-27 06:29:16 +02:00
parent 1fcaa10f7a
commit 86d4dfc8fc
2 changed files with 20 additions and 5 deletions

View File

@@ -1,16 +1,23 @@
install:
make install_composer
make clean_assets
make install_asset_dependencies
make install_assets
install_composer:
composer install
install_asset_dependencies:
npm install
./node_modules/.bin/gulp build
install_assets:
./node_modules/.bin/gulp install-assets
clean_assets:
rm -rf ./node_modules
rm -rf ./www/assets
rm -rf ./www/bower_components
npm install
./node_modules/.bin/gulp build
config:
@php bin/console compile:configuration

View File

@@ -5,7 +5,7 @@
become_user: vagrant
shell: export NVM_DIR="$HOME/.nvm" &&. "$NVM_DIR/nvm.sh" && npm install -g bower recess
- name: Initialize application dependencies
- name: Install Composer dependencies
shell: make install_composer
become: yes
become_user: vagrant
@@ -13,7 +13,15 @@
args:
chdir: /vagrant/
- name: Initialize and build application assets
- name: Install assets dependencies
shell: export NVM_DIR="$HOME/.nvm" &&. "$NVM_DIR/nvm.sh" && make install_asset_dependencies
become: yes
become_user: vagrant
ignore_errors: yes
args:
chdir: /vagrant/
- name: Install assets
shell: export NVM_DIR="$HOME/.nvm" &&. "$NVM_DIR/nvm.sh" && make install_assets
become: yes
become_user: vagrant
@@ -21,7 +29,7 @@
args:
chdir: /vagrant/
- name: Initialize application configuration
- name: Run application setup
become: yes
become_user: vagrant
shell: 'bin/setup system:install --email=admin@{{ hostname }}.vb --password=admin --db-host=127.0.0.1 --db-port=3306 --db-user={{ mariadb.user }} --db-password={{ mariadb.password }} --db-template=fr --appbox={{ mariadb.database }} --databox={{ mariadb.databox_db }} --server-name=www.{{ hostname }}.vb --data-path=/vagrant/datas -y'