Created
September 2, 2016 21:56
-
-
Save jm42/7bf8ce83c68b9df77ab15278e0043425 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: read config | |
when: version is not defined | |
shell: "cat {{ working_dir }}/app/config/config.yml" | |
register: config | |
changed_when: no | |
- name: set version | |
when: version is not defined | |
set_fact: version="{{ (config.stdout|from_yaml).parameters.project.version }}" | |
- name: set build dir | |
set_fact: build_dir="{{ temp_dir|default('/tmp') }}/argonbook_{{ version }}" | |
- name: clone working dir | |
git: | |
repo: "{{ working_dir }}" | |
dest: "{{ build_dir }}" | |
version: "{{ version }}" | |
- name: install node modules | |
command: npm install --only=production | |
args: | |
chdir: "{{ build_dir }}" | |
creates: "{{ build_dir }}/node_modules/" | |
- name: install bower components | |
command: bower install --production | |
args: | |
chdir: "{{ build_dir }}" | |
creates: "{{ build_dir }}/bower_components/" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment