Commit cdcb046
committed
fix(ci): clean stale legacy tracked dirs before submodule init
After the monorepo split, the old eafw_* directories remain on disk on
the staging server even after git reset --hard (the directories aren't
removed because they were tracked content, not files). git submodule
update --init then fails with 'destination path already exists and is
not an empty directory'.
Remove any eafw_* directory that doesn't already contain its own .git
reference before running the submodule init. Idempotent — once the
cleanup runs once and the submodules are properly checked out, the
condition (! -e $sub/.git) is false and the rm is skipped.1 parent abded75 commit cdcb046
1 file changed
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
326 | 326 | | |
327 | 327 | | |
328 | 328 | | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
329 | 340 | | |
330 | 341 | | |
331 | 342 | | |
| |||
0 commit comments