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 @@ ...@@ -34,6 +34,10 @@
force=yes owner={{ edxapp_user }} mode=0600 force=yes owner={{ edxapp_user }} mode=0600
when: EDXAPP_USE_GIT_IDENTITY 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 - name: git prune before checking out
shell: cd {{ edxapp_code_dir }} && git remote prune origin shell: cd {{ edxapp_code_dir }} && git remote prune origin
environment: environment:
...@@ -42,6 +46,7 @@ ...@@ -42,6 +46,7 @@
notify: notify:
- "restart edxapp" - "restart edxapp"
- "restart edxapp_workers" - "restart edxapp_workers"
when: git_dir.stat.exists and (git_dir.isdir is defined) and git_dir.stat.isdir
# Do A Checkout # Do A Checkout
- name: checkout edx-platform repo into {{ edxapp_code_dir }} - name: checkout edx-platform repo into {{ edxapp_code_dir }}
......
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