Skip to content
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

Added --solution-path option for getting projects from a solution file #5

Merged

Conversation

wterpstra
Copy link
Contributor

@wterpstra wterpstra commented Apr 22, 2021

This will add the feature to read the projects from a solution, this can come in handy in case your repository contains more projects than the projects you would like to scan for changes that affect those.

Help file will look like this:

affected
  Determines which projects are affected by a set of changes.

Usage:
  affected [options] [command]

Options:
  -p, --repository-path <repository-path>  Path to the root of the repository, where the .git directory is.
                                           [default: current directory]
  --solution-path <solution-path>          The path to the solution to resolve project files from. When omitted scans
                                           all directories in repository for project files instead.
  -v, --verbose                            Write useful messages or just the desired output. [default: False]
  --assume-changes <assume-changes>        Hypothetically assume that given projects have changed instead of using Git
                                           diff to determine them.
  --from <from>                            A branch or commit to compare against --to.
  --to <to>                                A branch or commit to compare against --from
  --version                                Show version information
  -?, -h, --help                           Show help and usage information

Commands:
  generate  Generates a Microsoft.Sdk.Traversal project which includes all affected projects as build targets.
  changes   Finds projects that have any changes in any of its files using Git

Do you think an option shorthand like -s would be preferred?

Fixed #4

Copy link
Owner

@leonardochaia leonardochaia left a comment

Choose a reason for hiding this comment

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

I think we can merge this.

I also think we need more tests lol

src/dotnet-affected/Commands/AffectedRootCommand.cs Outdated Show resolved Hide resolved
@leonardochaia leonardochaia merged commit 22af2cc into leonardochaia:main Jul 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support reading projects from a solution file
2 participants