Skip to content

Commit 81cccd1

Browse files
committed
Update ignoreCommand in vercel.json to handle missing previous SHA and improve fetch logic
1 parent 4233619 commit 81cccd1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

web/vercel.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@
99
"headers": [{"key": "Cache-Control", "value": "no-cache"}]
1010
}
1111
],
12-
"ignoreCommand": "git fetch --unshallow 2>/dev/null && echo $VERCEL_GIT_PREVIOUS_SHA $VERCEL_GIT_COMMIT_SHA && git diff $VERCEL_GIT_PREVIOUS_SHA $VERCEL_GIT_COMMIT_SHA --quiet -- ./ ../common/"
12+
"ignoreCommand": "git fetch origin --unshallow || git fetch origin --deepen=200 || true; echo \"prev=$VERCEL_GIT_PREVIOUS_SHA cur=$VERCEL_GIT_COMMIT_SHA\"; if [ -z \"$VERCEL_GIT_PREVIOUS_SHA\" ] || ! git cat-file -e \"$VERCEL_GIT_PREVIOUS_SHA^{commit}\" 2>/dev/null; then echo 'no usable previous sha - building'; exit 1; fi; git diff --quiet \"$VERCEL_GIT_PREVIOUS_SHA\" \"$VERCEL_GIT_COMMIT_SHA\" -- ./ ../common/"
1313
}

0 commit comments

Comments
 (0)