@@ -23,6 +23,7 @@ const {cd, cp, echo, exec, exit, mv, rm} = require('shelljs');
2323const spawn = require ( 'child_process' ) . spawn ;
2424const argv = require ( 'yargs' ) . argv ;
2525const path = require ( 'path' ) ;
26+ const { setupVerdaccio} = require ( './setup-verdaccio' ) ;
2627
2728const SCRIPTS = __dirname ;
2829const ROOT = path . normalize ( path . join ( __dirname , '..' ) ) ;
@@ -72,26 +73,14 @@ try {
7273 const REACT_NATIVE_PACKAGE = path . join ( ROOT , 'react-native-*.tgz' ) ;
7374
7475 describe ( 'Set up Verdaccio' ) ;
75- const verdaccioProcess = spawn ( 'npx' , [
76- 'verdaccio@5.15.3' ,
77- '--config' ,
78- '.circleci/verdaccio.yml' ,
79- ] ) ;
80- VERDACCIO_PID = verdaccioProcess . pid ;
81- exec ( 'npx wait-on@6.0.1 http://localhost:4873' ) ;
82- exec ( 'npm set registry http://localhost:4873' ) ;
83- exec ( 'echo "//localhost:4873/:_authToken=secretToken" > .npmrc' ) ;
76+ VERDACCIO_PID = setupVerdaccio ( ) ;
8477
8578 describe ( 'Publish packages' ) ;
8679 const packages = JSON . parse (
8780 JSON . parse ( exec ( 'yarn --json workspaces info' ) . stdout ) . data ,
8881 ) ;
8982 Object . keys ( packages )
90- . filter (
91- packageName =>
92- packageName !== '@react-native/tester' &&
93- packageName !== '@react-native/repo-config' ,
94- )
83+ . filter ( packageName => packageName !== '@react-native/repo-config' )
9584 . forEach ( packageName => {
9685 exec (
9786 `cd ${ packages [ packageName ] . location } && npm publish --registry http://localhost:4873 --yes --access public` ,
0 commit comments