diff --git a/local/scripts/sync-versions.sh b/local/scripts/sync-versions.sh index c2178098dc..2633811c4c 100755 --- a/local/scripts/sync-versions.sh +++ b/local/scripts/sync-versions.sh @@ -104,6 +104,16 @@ should_exclude() { [[ "$path" == *"$ex"* ]] && return 0 done + # Skip git-fetched upstream sources. Fetched recipe sources (e.g. brush + # from github) live in gitignored, untracked source/ trees; their crate + # versions belong to upstream, not to the Cat 1 in-house branch-version + # policy. Rewriting them breaks upstream-internal version requirements + # (this happened: brush-shell was forced to 0.3.1 while brush required + # ^0.4.0, breaking the build). In-house crates are tracked trees. + if ! git ls-files --error-unmatch "$path" >/dev/null 2>&1; then + return 0 + fi + return 1 }