mirror of
https://github.com/hanzoai/react.git
synced 2026-09-24 17:02:27 +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:
@@ -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
|
||||
|
||||
@@ -168,6 +168,15 @@ function processStable(buildDir) {
|
||||
);
|
||||
}
|
||||
|
||||
if (fs.existsSync(buildDir + '/facebook-react-native')) {
|
||||
const versionString =
|
||||
ReactVersion + '-native-fb-' + sha + '-' + dateString;
|
||||
updatePlaceholderReactVersionInCompiledArtifacts(
|
||||
buildDir + '/facebook-react-native',
|
||||
versionString
|
||||
);
|
||||
}
|
||||
|
||||
// Now do the semver ones
|
||||
const semverVersionsMap = new Map();
|
||||
for (const moduleName in stablePackages) {
|
||||
|
||||
Reference in New Issue
Block a user