Unverified Commit 3445a562 authored by Sebastian Silbermann's avatar Sebastian Silbermann Committed by GitHub

Add hint that sync-react doesn't automate everything (#66531)

parent ff366ed0
...@@ -145,8 +145,6 @@ Or, run this command with no arguments to use the most recently published versio ...@@ -145,8 +145,6 @@ Or, run this command with no arguments to use the most recently published versio
console.log() console.log()
} }
console.log(`Successfully updated React from ${baseSha} to ${newSha}.\n`)
// Fetch the changelog from GitHub and print it to the console. // Fetch the changelog from GitHub and print it to the console.
try { try {
const changelog = await getChangelogFromGitHub(baseSha, newSha) const changelog = await getChangelogFromGitHub(baseSha, newSha)
...@@ -178,6 +176,13 @@ Or run this command again without the --no-install flag to do both automatically ...@@ -178,6 +176,13 @@ Or run this command again without the --no-install flag to do both automatically
` `
) )
} }
console.log(
`Successfully updated React from ${baseSha} to ${newSha}.\n` +
`Don't forget to find & replace all references to the React version '${baseVersionStr}' with '${newVersionStr}':\n` +
`-${baseVersionStr}\n` +
`+${newVersionStr}\n`
)
} }
function readBoolArg(argv, argName) { function readBoolArg(argv, argName) {
...@@ -189,8 +194,8 @@ function readStringArg(argv, argName) { ...@@ -189,8 +194,8 @@ function readStringArg(argv, argName) {
return argIndex === -1 ? null : argv[argIndex + 1] return argIndex === -1 ? null : argv[argIndex + 1]
} }
function extractInfoFromReactVersion(reactCanaryVersion) { function extractInfoFromReactVersion(reactVersion) {
const match = reactCanaryVersion.match( const match = reactVersion.match(
/(?<semverVersion>.*)-(?<releaseLabel>.*)-(?<sha>.*)-(?<dateString>.*)$/ /(?<semverVersion>.*)-(?<releaseLabel>.*)-(?<sha>.*)-(?<dateString>.*)$/
) )
return match ? match.groups : null return match ? match.groups : null
...@@ -251,8 +256,8 @@ async function getChangelogFromGitHub(baseSha, newSha) { ...@@ -251,8 +256,8 @@ async function getChangelogFromGitHub(baseSha, newSha) {
return changelog.length > 0 ? changelog.join('\n') : null return changelog.length > 0 ? changelog.join('\n') : null
} }
sync('rc') sync('experimental')
.then(() => sync('experimental')) .then(() => sync('rc'))
.catch((error) => { .catch((error) => {
console.error(error) console.error(error)
process.exit(1) process.exit(1)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment