Trim leading hyphens from command-line argument keys in FrostingConfiguration
Trim leading hyphens from command-line argument keys in the
FrostingConfiguration.cs file to ensure consistent key
formatting when processing arguments. This change improves
compatibility and standardization in the args dictionary.
Addresses https://github.com/orgs/cake-build/discussions/4665
To test this add som configuration validation in Frosting integration test project here: https://github.com/cake-build/cake/tree/develop/tests/integration/Cake.Frosting/build
It's called here:
https://github.com/cake-build/cake/blob/3531435a932dd112984f04798af694efa5326997/build.cake#L374-L384
Any example I could follow?
Wouldn't it be better if there were also unit tests?
Any example I could follow?
You can add arguments here https://github.com/cake-build/cake/blob/3531435a932dd112984f04798af694efa5326997/build.cake#L375-L377
Environment variables can be set on the DotNetRunSettings using EnvironmentVariables property.
Config file is here: https://github.com/cake-build/cake/blob/3531435a932dd112984f04798af694efa5326997/tests/integration/Cake.Frosting/cake.config#L1-L2
Which then should be able to be picked up in a task here https://github.com/cake-build/cake/tree/3531435a932dd112984f04798af694efa5326997/tests/integration/Cake.Frosting/build/Tasks
Wouldn't it be better if there were also unit tests?
Integration test would E"E, but Unit tests won't hurt, Frosting specific tests are located here https://github.com/cake-build/cake/blob/3531435a932dd112984f04798af694efa5326997/src/Cake.Frosting.Tests/CakeHostTests.cs
Any example I could follow?
You can add arguments here
https://github.com/cake-build/cake/blob/3531435a932dd112984f04798af694efa5326997/build.cake#L375-L377
Environment variables can be set on the DotNetRunSettings using EnvironmentVariables property.
Config file is here:
https://github.com/cake-build/cake/blob/3531435a932dd112984f04798af694efa5326997/tests/integration/Cake.Frosting/cake.config#L1-L2
Which then should be able to be picked up in a task here https://github.com/cake-build/cake/tree/3531435a932dd112984f04798af694efa5326997/tests/integration/Cake.Frosting/build/Tasks
Wouldn't it be better if there were also unit tests?
Integration test would E"E, but Unit tests won't hurt, Frosting specific tests are located here https://github.com/cake-build/cake/blob/3531435a932dd112984f04798af694efa5326997/src/Cake.Frosting.Tests/CakeHostTests.cs
@devlead,
I couldn't figure out how to assert the results using the tasks you pointed to, but I added unit tests.
@paulomorgado your changes have been merged, thanks for your contribution 👍
@paulomorgado your changes have been merged, thanks for your contribution 👍
@devlead, thank you for your help.