@@ -27,9 +27,8 @@ const {
2727 publishExternalArtifactsToMaven,
2828} = require ( '../releases/utils/release-utils' ) ;
2929const { getBranchName} = require ( '../releases/utils/scm-utils' ) ;
30- const { REPO_ROOT } = require ( '../shared/consts' ) ;
31- const { getPackages, getWorkspaceRoot} = require ( '../shared/monorepoUtils' ) ;
32- const path = require ( 'path' ) ;
30+ const { REACT_NATIVE_PACKAGE_DIR } = require ( '../shared/consts' ) ;
31+ const { getPackages, getReactNativePackage} = require ( '../shared/monorepoUtils' ) ;
3332const yargs = require ( 'yargs' ) ;
3433
3534/**
@@ -109,16 +108,14 @@ async function publishNpm(buildType /*: BuildType */) /*: Promise<void> */ {
109108 // Before updating React Native artifacts versions for dry-run, we check if the version has already been set.
110109 // If it has, we don't need to update the artifacts at all (at this will revert them back to 1000.0.0)
111110 // If it hasn't, we can update the native artifacts accordingly.
112- const projectInfo = await getWorkspaceRoot ( ) ;
111+ const projectInfo = await getReactNativePackage ( ) ;
113112
114113 if ( projectInfo . version === '1000.0.0' ) {
115114 // Set hermes versions to latest available if not on a stable branch
116115 if ( ! / .* - s t a b l e / . test ( getBranchName ( ) ) ) {
117116 await updateHermesVersionsToNightly ( ) ;
118117 }
119118 await updateReactNativeArtifacts ( version , buildType ) ;
120- } else {
121- await updateReactNativeArtifacts ( projectInfo . version , buildType ) ;
122119 }
123120 }
124121
@@ -136,8 +133,7 @@ async function publishNpm(buildType /*: BuildType */) /*: Promise<void> */ {
136133 // NPM publishing is done just after.
137134 publishExternalArtifactsToMaven ( version , buildType ) ;
138135
139- const packagePath = path . join ( REPO_ROOT , 'packages' , 'react-native' ) ;
140- const result = publishPackage ( packagePath , {
136+ const result = publishPackage ( REACT_NATIVE_PACKAGE_DIR , {
141137 tags : [ tag ] ,
142138 } ) ;
143139
0 commit comments