Skip to content

Commit 24b40b6

Browse files
committed
Run git clean after checking git clone is successful
1 parent ca56ae5 commit 24b40b6

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
* Fix `DEPLOY_UNFINISHED` not being copied over to `release` folder (#[1145])(https://github.com/roots/trellis/pull/1145)
88
* Deploy: Remove untracked files from project folder ([#1146](https://github.com/roots/trellis/pull/1146))
99
* Nginx: Block `composer/installed.json` ([#1150](https://github.com/roots/trellis/pull/1150))
10+
* Run `git clean` after checking `git clone` is successful ([#1151](https://github.com/roots/trellis/pull/1151))
1011

1112
### 1.3.0: December 7th, 2019
1213
* Add `git_sha` and `release_version` to `.env` on deploy ([#1124](https://github.com/roots/trellis/pull/1124))

roles/deploy/tasks/update.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,6 @@
2424
no_log: true
2525
register: git_clone
2626

27-
- name: Remove untracked files from project folder
28-
command: git clean -fdx
29-
args:
30-
chdir: "{{ project_source_path }}"
31-
register: git_clean
32-
changed_when: not not(git_clean.stdout)
33-
3427
- name: Failed connection to remote repo
3528
fail:
3629
msg: |
@@ -40,6 +33,13 @@
4033
> https://roots.io/trellis/docs/ssh-keys/#cloning-remote-repo-using-ssh-agent-forwarding
4134
when: git_clone is failed
4235

36+
- name: Remove untracked files from project folder
37+
command: git clean -fdx
38+
args:
39+
chdir: "{{ project_source_path }}"
40+
register: git_clean
41+
changed_when: not not(git_clean.stdout)
42+
4343
- include_tasks: "{{ include_path }}"
4444
with_items: "{{ deploy_update_after | default([]) }}"
4545
loop_control:

0 commit comments

Comments
 (0)