@@ -20,7 +20,6 @@ const {exec, pushd, popd, pwd, cd, sed} = require('shelljs');
20
20
const updateTemplatePackage = require ( './update-template-package' ) ;
21
21
const yargs = require ( 'yargs' ) ;
22
22
const path = require ( 'path' ) ;
23
- const fs = require ( 'fs' ) ;
24
23
25
24
const {
26
25
checkPackagerRunning,
@@ -184,24 +183,16 @@ async function testRNTestProject(circleCIArtifacts) {
184
183
// create the local npm package to feed the CLI
185
184
186
185
// base setup required (specular to publish-npm.js)
187
- const baseVersion = require ( '../packages/react-native/package.json' ) . version ;
188
186
189
187
// in local testing, 1000.0.0 mean we are on main, every other case means we are
190
188
// working on a release version
191
- const buildType = baseVersion !== '1000.0.0' ? 'release' : 'dry-run' ;
192
189
const shortCommit = exec ( 'git rev-parse HEAD' , { silent : true } )
193
190
. toString ( )
194
191
. trim ( )
195
192
. slice ( 0 , 9 ) ;
196
193
197
- // we need to add the unique timestamp to avoid npm/yarn to use some local caches
198
- const dateIdentifier = new Date ( )
199
- . toISOString ( )
200
- . slice ( 0 , - 8 )
201
- . replace ( / [ - : ] / g, '' )
202
- . replace ( / [ T ] / g, '-' ) ;
203
-
204
194
const releaseVersion = `1000.0.0-${ shortCommit } ` ;
195
+ const buildType = 'dry-run' ;
205
196
206
197
// Prepare some variables for later use
207
198
const repoRoot = pwd ( ) ;
@@ -212,6 +203,7 @@ async function testRNTestProject(circleCIArtifacts) {
212
203
circleCIArtifacts != null
213
204
? path . join ( circleCIArtifacts . baseTmpPath ( ) , 'maven-local' )
214
205
: '/private/tmp/maven-local' ;
206
+
215
207
const hermesPath = await prepareArtifacts (
216
208
circleCIArtifacts ,
217
209
mavenLocalPath ,
@@ -234,9 +226,16 @@ async function testRNTestProject(circleCIArtifacts) {
234
226
cd ( 'RNTestProject' ) ;
235
227
exec ( 'yarn install' ) ;
236
228
229
+ // When using CircleCI artifacts, the CI will zip maven local into a
230
+ // /tmp/maven-local subfolder struct.
231
+ // When we generate the project manually, there is no such structure.
232
+ const expandedMavenLocal =
233
+ circleCIArtifacts == null
234
+ ? mavenLocalPath
235
+ : `${ mavenLocalPath } /tmp/maven-local` ;
237
236
// need to do this here so that Android will be properly setup either way
238
237
exec (
239
- `echo "react.internal.mavenLocalRepo=${ mavenLocalPath } /tmp/maven-local " >> android/gradle.properties` ,
238
+ `echo "react.internal.mavenLocalRepo=${ expandedMavenLocal } " >> android/gradle.properties` ,
240
239
) ;
241
240
242
241
// Update gradle properties to set Hermes as false
0 commit comments