-
-
Notifications
You must be signed in to change notification settings - Fork 758
Add support for capturing MSBuild properties, items and target results #4329
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
Add support for capturing MSBuild properties, items and target results #4329
Conversation
b95922c to
0333fcc
Compare
6a074da to
76a1b2b
Compare
|
@devlead, is there anything needed here? |
Don't know, a the moment just the maintainers' time to get bearings on what's trying to be achieved and review and understand the multiple changes introduced. Meanwhile, answers to most questions about what's expected from PRs and what to expect can be found in our Contribution Guidelines. |
76a1b2b to
fa9d0c6
Compare
Introduce the ability to capture and process the standard output of MSBuild commands in the Cake build automation system. - Added `StandardOutputAction` properties to `DotNetCoreMSBuildBuilderFixture` and `MSBuildRunnerFixture`. - Updated `RunTool` methods to pass `StandardOutputAction` to `Build` and `Run` methods. - Added new test cases in `DotNetMSBuildBuilderTests` and `MSBuildRunnerTests` to verify functionality. - Added overloads in `DotNetAliases` and `MSBuildAliases` to accept `standardOutputAction` parameter. - Updated `DotNetMSBuildBuilder` and `MSBuildRunner` to handle `standardOutputAction` and configure process settings. - Enhanced `MSBuildArgumentBuilderExtensions` to append MSBuild arguments for properties, items, and target results. - Extended `DotNetMSBuildSettings` and `MSBuildSettings` with new properties and collections. - Added extension methods in `DotNetMSBuildSettingsExtensions` for fluent configuration.
fa9d0c6 to
6a26f31
Compare
devlead
left a comment
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.
There’s a lot going on in this pull request, could you add integration tests below for the new bits introduced in this PR
https://github.com/cake-build/cake/blob/develop/tests/integration/Cake.Common/Tools/DotNet/DotNetAliases.cake
657bd71 to
73877eb
Compare
73877eb to
b085967
Compare
Done, @devlead! Please, check if it's enough. I don't want the tests to become too brittle. |
devlead
left a comment
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.
Found a typo in the integration tests, also as it's json in a given format wondering if helpers / overload for that should be provided for this to be more useful🤔
Co-authored-by: Mattias Karlsson <[email protected]>
The output can be a string if requesting the value of only one property or JSON for any other cases. The interpretation of the output is very tied to what the user wants to retrieve and this change does not limit the collection of the output to querying properties, items or results. I would defer creating any helpers for when the community asks and makes a good case for them. |
devlead
left a comment
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.
LGTM
|
@paulomorgado your changes have been merged, thanks for your contribution 👍 |
Add support for capturing MSBuild properties, items and target results using Evaluate items and properties and display results of targets.
StandardOutputActionproperties toDotNetCoreMSBuildBuilderFixtureandMSBuildRunnerFixture.RunToolmethods to passStandardOutputActiontoBuildandRunmethods.DotNetMSBuildBuilderTestsandMSBuildRunnerTeststo verify functionality.DotNetAliasesandMSBuildAliasesto acceptstandardOutputActionparameter.DotNetMSBuildBuilderandMSBuildRunnerto handlestandardOutputActionand configure process settings.MSBuildArgumentBuilderExtensionsto append MSBuild arguments for properties, items, and target results.DotNetMSBuildSettingsandMSBuildSettingswith new properties and collections.DotNetMSBuildSettingsExtensionsfor fluent configuration.