Commit 66d3b2b3 by Max Rothman

Merge pull request #1798 from edx/max/fix-prune

Fix git prune task failing when repo doesn't yet exist
parents 607a1d27 18d5126b
......@@ -34,6 +34,10 @@
force=yes owner={{ edxapp_user }} mode=0600
when: EDXAPP_USE_GIT_IDENTITY
- name: check if git repo exists before pruning
stat: path={{ edxapp_code_dir }}/.git
register: git_dir
- name: git prune before checking out
shell: cd {{ edxapp_code_dir }} && git remote prune origin
environment:
......@@ -42,7 +46,8 @@
notify:
- "restart edxapp"
- "restart edxapp_workers"
when: git_dir.stat.exists and (git_dir.isdir is defined) and git_dir.stat.isdir
# Do A Checkout
- name: checkout edx-platform repo into {{ edxapp_code_dir }}
git: >
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment