-
Notifications
You must be signed in to change notification settings - Fork 45.7k
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
DevTools build script enhancements #17653
Merged
bvaughn
merged 5 commits into
facebook:master
from
bvaughn:devtools-build-script-enhancements
Dec 18, 2019
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
0a05f0b
Updated DevTools local development instructions to mention experiment…
f69a180
Added a command to download latest experimental release (for DevTools)
1c3a7db
Updated build instructions for clarity
eaf12e5
Added build-for-devtools package alias
430db52
Prettier
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains 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 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 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 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 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
25 changes: 25 additions & 0 deletions
25
scripts/release/download-experimental-build-commands/print-summary.js
This file contains 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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/usr/bin/env node | ||
|
||
'use strict'; | ||
|
||
const clear = require('clear'); | ||
const {join, relative} = require('path'); | ||
const theme = require('../theme'); | ||
|
||
module.exports = ({build}) => { | ||
const commandPath = relative( | ||
process.env.PWD, | ||
join(__dirname, '../download-experimental-build.js') | ||
); | ||
|
||
clear(); | ||
|
||
const message = theme` | ||
{caution An experimental build has been downloaded!} | ||
|
||
You can download this build again by running: | ||
{path ${commandPath}} --build={build ${build}} | ||
`; | ||
|
||
console.log(message.replace(/\n +/g, '\n').trim()); | ||
}; |
This file contains 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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/usr/bin/env node | ||
|
||
'use strict'; | ||
|
||
const {join} = require('path'); | ||
const {getPublicPackages, handleError} = require('./utils'); | ||
|
||
const checkEnvironmentVariables = require('./shared-commands/check-environment-variables'); | ||
const downloadBuildArtifacts = require('./shared-commands/download-build-artifacts'); | ||
const getLatestMasterBuildNumber = require('./shared-commands/get-latest-master-build-number'); | ||
const parseParams = require('./shared-commands/parse-params'); | ||
const printSummary = require('./download-experimental-build-commands/print-summary'); | ||
|
||
const run = async () => { | ||
try { | ||
const params = parseParams(); | ||
params.cwd = join(__dirname, '..', '..'); | ||
params.packages = await getPublicPackages(); | ||
|
||
if (!params.build) { | ||
params.build = await getLatestMasterBuildNumber(true); | ||
} | ||
|
||
await checkEnvironmentVariables(params); | ||
await downloadBuildArtifacts(params); | ||
|
||
printSummary(params); | ||
} catch (error) { | ||
handleError(error); | ||
} | ||
}; | ||
|
||
run(); |
This file contains 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
File renamed without changes.
File renamed without changes.
This file contains 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
File renamed without changes.
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.
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.
It’s not clear that this is an alternative to the previous step.
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.
Why not? They're subheaders under the same header which says,
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 could make the header size smaller maybe?
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.
Is there a problem with just having one of them? Like, downloading from CI could be the suggested option, and you have a postscript that mentions that’s you can also build from source if needed.
I’m thinking from perspective of someone following instructions to build the extension, who doesn’t understand what these deps are, or what context they provide. If I had to quickly make a build and followed these instructions, I might have done both steps. Ofc this is just a nit, so feel free to ignore.
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.
Yes. It's not sufficient.
We probably want to build from source, so we can test both DevTools and React changes.
External contributors (or Mozilla reviewers) probably want to download a CI build because it's faster and their purpose is not to test React.