You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This ticket covers the changes/additions we would need to make to our existing release scripts to support automatically publishing canaries from master.
Create a canary from current Git branch and revision #14244: Auto-generate a checksum file and add it to each NPM package (as well as the files array in the package.json). This will enable us to later verify that that a specific package version corresponds with a specific Git revision to help ensure that we don't accidentally publish incompatible sibling packages.
Save CI-built node_modules as build artifacts #14205: Circle CI already builds all of our packages and runs tests again both source and the built modules. This is most of what our build script currently does. We should go ahead and save the resulting builds to Circle CI so that we can just download and publish them as-is.
Promote a canary from NPM to be a stable release #14255: It should prompt for a version number for each package. (By default, it could fill in the latest major+minor by querying NPM.) This should be done up front because of inter-package dependencies (e.g. react depends on scheduler).
Promote a canary from NPM to be a stable release #14255: It should replace the canary version number (in both package.json and in the source for renderers) with the specified version. It should also replace version numbers for dependencies/peerDependencies.
Publish a local release (canary or stable) to NPM #14260: The script should also support basic "resume" functionality by checking to each package to see if it has already been published before publishing it (and skipping it if so).
Add basic release script snapshot test #14280: Create snapshot tests for the new promote script above that runs each in a "dry run" mode and compares the resulting package.json content. (We could use this to promote a known canary version to a specific release version in order to regression test changes to the build script in the future.)
Automatically create the GitHub release for stables (see API docs).
Open questions
When do we update scripts/error-codes/codes.json? Does this file need to be generated by CI and stored as an artifact as well? Should the publish script clone the React repo, checkout the version specified by build-info.json, and run the error codes update script as part of publishing?
How do we want to version react-cache? It is currently marked private so the release scripts will ignore it, but if we made it public– the current version schema would cause problems. Our release script assumes that packages will either be unstable releases or lock-synced with the main React version but react-cache is currently tagged as version 2.0. Solution: Skip this package for now (since it's private) and stick with a 2.x version scheme.
This ticket covers the changes/additions we would need to make to our existing release scripts to support automatically publishing canaries from master.
Changes to CI scripts
scripts/release/build.jsto share code for building and generating artifacts. (There's a lot of redundancy now.)filesarray in thepackage.json). This will enable us to later verify that that a specific package version corresponds with a specific Git revision to help ensure that we don't accidentally publish incompatible sibling packages.Changes to local scripts
build/node_modulespackagesdirectory to determine the list of non-private packages, and then check out the canary version of each package tobuild/node_modules.reactdepends onscheduler).package.jsonand in the source for renderers) with the specified version. It should also replace version numbers fordependencies/peerDependencies.--tags=latest,--tags=latest,next).build-info.json).--tags latest).Nice to have
create-canary) and show a progress bar with estimated time remaining.package.jsoncontent. (We could use this to promote a known canary version to a specific release version in order to regression test changes to the build script in the future.)Open questions
scripts/error-codes/codes.json? Does this file need to be generated by CI and stored as an artifact as well? Should the publish script clone the React repo, checkout the version specified bybuild-info.json, and run the error codes update script as part of publishing?react-cache? It is currently markedprivateso the release scripts will ignore it, but if we made it public– the current version schema would cause problems. Our release script assumes that packages will either be unstable releases or lock-synced with the main React version butreact-cacheis currently tagged as version 2.0. Solution: Skip this package for now (since it'sprivate) and stick with a 2.x version scheme.