Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion scripts/e2e/init-project-e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ async function initNewProjectFromSource(
// packages are updated in a lockstep, let's get the version of the first one
const version = packages[Object.keys(packages)[0]].packageJson.version;

// npm >= 11 refuses to publish a prerelease version (e.g. 0.87.0-rc.0)
// without an explicit --tag, since it would otherwise become `latest`.
const publishTag = version.includes('-') ? ' --tag prerelease' : '';

console.log('Publishing packages to local npm proxy\n');
for (const {path: packagePath, packageJson} of Object.values(packages)) {
const desc = `${packageJson.name} (${path.relative(
Expand All @@ -122,7 +126,7 @@ async function initNewProjectFromSource(
`${desc} ${styleText('dim', '.').repeat(Math.max(0, 72 - desc.length))} `,
);
execSync(
`npm publish --registry ${VERDACCIO_SERVER_URL} --access public`,
`npm publish --registry ${VERDACCIO_SERVER_URL} --access public${publishTag}`,
{
cwd: packagePath,
stdio: verbose ? 'inherit' : [process.stderr],
Expand Down
6 changes: 4 additions & 2 deletions scripts/release-testing/test-release-local.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,9 +290,11 @@ async function testRNTestProject(

cd('RNTestProject');

// need to do this here so that Android will be properly setup either way
// need to do this here so that Android will be properly setup either way.
// Use printf, not `echo -e`: on macOS /bin/sh's echo doesn't support -e, so
// it appends a literal "-e " onto the previous property and corrupts the file.
exec(
`echo -e "\nreact.internal.mavenLocalRepo=${mavenLocalPath}" >> android/gradle.properties`,
`printf '\\nreact.internal.mavenLocalRepo=%s\\n' "${mavenLocalPath}" >> android/gradle.properties`,
);

// Only build the simulator architecture. CI is however generating only that one.
Expand Down
Loading