-
Notifications
You must be signed in to change notification settings - Fork 48.7k
Fix release script --commit param #20720
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,12 +38,8 @@ module.exports = async () => { | |
const params = commandLineArgs(paramDefinitions); | ||
|
||
if (params.build !== null) { | ||
if (params.commit !== null) { | ||
console.error( | ||
'`build` and `commmit` params are mutually exclusive. Choose one or the other.`' | ||
); | ||
process.exit(1); | ||
} | ||
// TODO: Should we just remove the `build` param? Seems like `commit` is a | ||
// sufficient replacement. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll do this. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like the release script README is in a broken state at the moment. I'll take a pass at that too with an update PR. |
||
} else { | ||
if (params.commit === null) { | ||
console.error('Must provide either `build` or `commit`.'); | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a simpler solution but as it stands after this PR, the Firefox DevTools release process will be broken (because their testers need to have a reproducible from source and
scripts/release/download-experimental-build.js --commit=master
isn't a valid way to repro a specific build). I'll propose a small change with a follow up PR though!There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm do we not include the
build-info.json
with CI builds anymore? I was hoping we could read from it instead but I don't see it in thebuild2
artifacts.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ooh now I see this:
react/scripts/release/publish-commands/print-follow-up-instructions.js
Lines 39 to 43 in 0e526bc
But is there a reason why the new build script doesn't/can't output it? We're in a weird space now where our scripts both validate and require that
build-info.json
is in the packagefiles
array and we no longer publish it 😁I guess I can always parse it out of the build number?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some follow up: #20723
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Figured it was worth seeing if it's actually necessary anymore. Might be nice to stop requiring every package to publish that file to npm, if we can.
I believe the last remaining reason we need it is because the
prepare-release-from-npm
needs it. But maybe we can instead pull the build artifacts from CI, like we do with prereleases.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess, but at the same time I don't see much of a downside of publishing it. It adds a little complexity in one place (but we already have it in place and well "tested") in exchange for avoiding it in another (having to pull a duplicate artifact from CI somehow– which seems difficult to do if we don't have build-info)