Skip to content

Instantly share code, notes, and snippets.

@jm42
Created September 2, 2016 21:56
Show Gist options
  • Save jm42/7bf8ce83c68b9df77ab15278e0043425 to your computer and use it in GitHub Desktop.
Save jm42/7bf8ce83c68b9df77ab15278e0043425 to your computer and use it in GitHub Desktop.
- 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