Thanks to visit codestin.com
Credit goes to github.com

Skip to content

--examples for get/upgrade/downgrade/add/remove #2857

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 22 commits into from
Sep 13, 2021

Conversation

sigurdm
Copy link
Contributor

@sigurdm sigurdm commented Jan 29, 2021

This flag will make the commands also acquire dependencies for an example/ folder (if example/pubspec.yaml exists).

pub add --example foo will not add foo as a dependency to example/pubspec.yaml, only run an implicit pub get in example/.

pub upgrade --example will upgrade both . and example/.

pub upgrade --major-versions --example will only run in '.' and warn that it should be run in example/ separately.

#2831

@google-cla google-cla bot added the cla: yes label Jan 29, 2021
@sigurdm sigurdm closed this Aug 24, 2021
@sigurdm sigurdm reopened this Aug 24, 2021
@sigurdm sigurdm marked this pull request as ready for review August 30, 2021 10:01
@sigurdm sigurdm requested a review from jonasfj August 30, 2021 10:01
Copy link
Member

@jonasfj jonasfj left a comment

Choose a reason for hiding this comment

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

I'm a tiny bit unsure about upgrade --major-versions semantics..


argParser.addFlag(
'example',
help: 'Also update dependencies in `example/` (if it exists).',
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
help: 'Also update dependencies in `example/` (if it exists).',
help: 'Also update dependencies in `example/` after modifying pubspec.yaml in root package (if it exists).',

Just to clearify that this doesn't change pubspec.yaml in the example/

@sigurdm
Copy link
Contributor Author

sigurdm commented Sep 3, 2021

PTAL

@sigurdm sigurdm requested a review from jonasfj September 3, 2021 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants