mirror of
https://github.com/facebook/react.git
synced 2026-02-23 20:23:02 +00:00
Fix xplat sync to ignore @generated header (#29738)
Use some clever git diffing to ignore lines that only change the `@generated` header. We can't do this for the version string because the version string can be embedded in lines with other changes, but this header is always on one line.
This commit is contained in:
4
.github/workflows/commit_artifacts.yml
vendored
4
.github/workflows/commit_artifacts.yml
vendored
@@ -329,7 +329,9 @@ jobs:
|
||||
git status
|
||||
echo "===================="
|
||||
echo "Checking for changes"
|
||||
if git status --porcelain | grep -qv '/REVISION'; then
|
||||
# Check if there are changes in the files other than REVISION or @generated headers
|
||||
# We also filter out the file name lines with "---" and "+++".
|
||||
if git diff -- . ':(exclude)*REVISION' | grep -vE "^(@@|diff|index|\-\-\-|\+\+\+|@generated SignedSource)" | grep "^[+-]" > /dev/null; then
|
||||
echo "Changes detected"
|
||||
echo "should_commit=true" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user