Skip to content

Commit 21a228e

Browse files
committed
Fix #4: Execute gulp build if gulpfile present
1 parent 2ca8d83 commit 21a228e

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

tasks/main.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,15 @@
44
- name: Check that project path in dev as specified in configuration is valid and has wsgi script
55
local_action: stat path={{ conf.dev_path }}/index.wsgi
66
register: check_dev_path
7-
fail_when: check_dev_path.stat.exists == False
7+
failed_when: check_dev_path.stat.exists == False
8+
9+
- name: Check if gulp file exists
10+
local_action: stat path={{ conf.dev_path }}/gulpfile.js
11+
register: check_gulp_file
12+
13+
- name: Execute gulp
14+
local_action: command gulp build --production chdir={{ conf.dev_path }}
15+
when: check_gulp_file.stat.exists == True
816

917
- name: Set Python executable
1018
set_fact: python="`which python{{ conf.python_version | default('3.5') }}`"

0 commit comments

Comments
 (0)