From 182fa823eabe66d91bad9a8cef72780417abea2c Mon Sep 17 00:00:00 2001 From: Tim Yung Date: Wed, 29 May 2024 22:51:32 -0700 Subject: [PATCH] Revert "Use content hash for react-native builds (#26734)" This reverts commit 5dd90c562354758942c833b0a46923176e92208e. --- .github/workflows/commit_artifacts.yml | 9 -------- scripts/rollup/build-all-release-channels.js | 22 +------------------- 2 files changed, 1 insertion(+), 30 deletions(-) diff --git a/.github/workflows/commit_artifacts.yml b/.github/workflows/commit_artifacts.yml index 3b09f99803ed4..ca1dd55f478cc 100644 --- a/.github/workflows/commit_artifacts.yml +++ b/.github/workflows/commit_artifacts.yml @@ -225,16 +225,7 @@ jobs: name: compiled-rn path: compiled-rn/ - run: git status -u - - name: Check if only the REVISION file has changed - id: check_should_commit - run: | - if git status --porcelain | grep -qv '/REVISION$'; then - echo "should_commit=true" >> "$GITHUB_OUTPUT" - else - echo "should_commit=false" >> "$GITHUB_OUTPUT" - fi - name: Commit changes to branch - if: steps.check_should_commit.outputs.should_commit == 'true' uses: stefanzweifel/git-auto-commit-action@v4 with: commit_message: | diff --git a/scripts/rollup/build-all-release-channels.js b/scripts/rollup/build-all-release-channels.js index b7427d135bcc6..85206f7b369f6 100644 --- a/scripts/rollup/build-all-release-channels.js +++ b/scripts/rollup/build-all-release-channels.js @@ -173,27 +173,7 @@ function processStable(buildDir) { ); } - const reactNativeBuildDir = buildDir + '/react-native/implementations/'; - if (fs.existsSync(reactNativeBuildDir)) { - const hash = crypto.createHash('sha1'); - for (const fileName of fs.readdirSync(reactNativeBuildDir).sort()) { - const filePath = reactNativeBuildDir + fileName; - const stats = fs.statSync(filePath); - if (!stats.isDirectory()) { - hash.update(fs.readFileSync(filePath)); - } - } - updatePlaceholderReactVersionInCompiledArtifacts( - reactNativeBuildDir, - ReactVersion + - '-' + - canaryChannelLabel + - '-' + - hash.digest('hex').slice(0, 8) - ); - } - - // Update remaining placeholders with canary channel version + // Update remaining placeholders with next channel version updatePlaceholderReactVersionInCompiledArtifacts( buildDir, ReactVersion + '-' + canaryChannelLabel + '-' + sha + '-' + dateString