Commit 83186f8
committed
fix: Make netlify-fetch immune to stale cached release branches
Production builds failed with antora unable to find a commit on
release-26.7: the branch had been force-pushed after creation, the old
tip only survived as a local ref in the netlify build cache, and the
loop's ref update had failed silently (background auto-gc can race the
ref update; -q swallowed the error and the loop continued).
- Branch list from git ls-remote instead of the cached remote-tracking
refs (which make expanded before the fetch even ran, so a brand-new
release branch was invisible to its first build).
- gc.auto=0 inside the loop, no more silent failures: set -e aborts
the build at the failing command instead of surfacing as a
missing-object error from antora much later.
- git fetch --all --prune keeps the remote-tracking refs honest.1 parent 1f51229 commit 83186f8
1 file changed
Lines changed: 10 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
71 | 76 | | |
72 | 77 | | |
73 | 78 | | |
| |||
0 commit comments