Skip to content

Add generate-build-script command #838

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 2 commits into from
Jan 12, 2018
Merged

Conversation

natebosch
Copy link
Member

Closes #778

Wrapping entrypoints can use this to generate the build script and then
run it using Isolate.spawnUri and avoid workarounds like
--assume-tty.

Closes #778

Wrapping entrypoints can use this to generate the build script and then
run it using `Isolate.spawnUri` and avoid workaarounds like
`--assume-tty`.
@natebosch natebosch requested a review from nshahan January 12, 2018 05:51
@googlebot googlebot added the cla: yes Google is happy with the PR contributors label Jan 12, 2018
Copy link
Contributor

@jakemac53 jakemac53 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with one comment

// Use the actual command runner to parse the args and immediately print the
// usage information if there is no command provided or the help command was
// explicitly invoked.
var commandRunner = new BuildCommandRunner([]);
var commandRunner = new BuildCommandRunner([])
..addCommand(new _GenerateBuildScript());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason we shouldn't add this to the command runner generally?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The other place we use this CommandRunner doesn't have the capability of performing this command.


class _GenerateBuildScript extends Command {
@override
final description = 'Generate a script to run builds and print the file path';
Copy link
Contributor

@nshahan nshahan Jan 12, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: the script is generated no matter what, the command only prints the path and turns off logging. Maybe a note in the description about how this is only really useful for wrapper scripts.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@jakemac53
Copy link
Contributor

Feel free to fix the analysis errors in a later pr as they are unrelated to this change.

@natebosch natebosch merged commit 71b79a6 into master Jan 12, 2018
@natebosch natebosch deleted the generate-build-script-command branch January 12, 2018 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Google is happy with the PR contributors
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants