File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -228,7 +228,16 @@ jobs:
228228 name : compiled-rn
229229 path : compiled-rn/
230230 - run : git status -u
231+ - name : Check if only the REVISION file has changed
232+ id : check_should_commit
233+ run : |
234+ if git status --porcelain | grep -qv '/REVISION$'; then
235+ echo "should_commit=true" >> "$GITHUB_OUTPUT"
236+ else
237+ echo "should_commit=false" >> "$GITHUB_OUTPUT"
238+ fi
231239 - name : Commit changes to branch
240+ if : steps.check_should_commit.outputs.should_commit == 'true'
232241 uses : stefanzweifel/git-auto-commit-action@v4
233242 with :
234243 commit_message : |
Original file line number Diff line number Diff line change @@ -177,6 +177,26 @@ function processStable(buildDir) {
177177 ) ;
178178 }
179179
180+ const reactNativeBuildDir = buildDir + '/react-native/implementations/' ;
181+ if ( fs . existsSync ( reactNativeBuildDir ) ) {
182+ const hash = crypto . createHash ( 'sha1' ) ;
183+ for ( const fileName of fs . readdirSync ( reactNativeBuildDir ) . sort ( ) ) {
184+ const filePath = reactNativeBuildDir + fileName ;
185+ const stats = fs . statSync ( filePath ) ;
186+ if ( ! stats . isDirectory ( ) ) {
187+ hash . update ( fs . readFileSync ( filePath ) ) ;
188+ }
189+ }
190+ updatePlaceholderReactVersionInCompiledArtifacts (
191+ reactNativeBuildDir ,
192+ ReactVersion +
193+ '-' +
194+ nextChannelLabel +
195+ '-' +
196+ hash . digest ( 'hex' ) . slice ( 0 , 8 )
197+ ) ;
198+ }
199+
180200 // Update remaining placeholders with next channel version
181201 updatePlaceholderReactVersionInCompiledArtifacts (
182202 buildDir ,
You can’t perform that action at this time.
0 commit comments