ubisoft / Sharpmake

Sharpmake is an open-source C#-based solution for generating project definition files, such as Visual Studio projects and solutions, GNU makefiles, Xcode projects, etc.
Apache License 2.0
927 stars 171 forks source link

Add environment variable expansion to Include attribute #259

Closed cmello closed 1 year ago

cmello commented 1 year ago

Hi folks,

It would be quite handy to use environment variables inside the path of module includes, like this:

[module:Include(@"%BUILD_TOOLS%\Tool1\SharpMake.Tool1.Project.cs")]

Do you think that's a good idea, or would you suggest a better alternative? If you think it's a useful feature, please consider reviewing this pull request.

Each environment variable is quoted with the percent sign character (%), the same behavior specified by System.Environment.ExpandEnvironmentVariables.

Thank you!

Best regards, Cesar

jspelletier commented 1 year ago

looks fine to me. Thanks for adding a unittest.

jspelletier commented 1 year ago

Can you rebase? It looks like you are missing commit https://github.com/ubisoft/Sharpmake/commit/8aa43aa06779d6ae760151c20694a8428bbd964f and the CI is failing on your PR.

cmello commented 1 year ago

Thank you for looking! hmmm that's weird. I rebased, but everything was up to date if I understand correctly. I already had 8aa43aa in my initial fork.

jspelletier commented 1 year ago

ok. it looks like something we did in the ci is not working

cmello commented 1 year ago

Rebased again on top of the latest CI changes (a9b6e29 and 3bc9a58). Thanks!

cmello commented 1 year ago

Please could you approve the workflow checks again? Thank you very much!

jspelletier commented 1 year ago

CI still fails... Sorry about this. We are trying to fix those issues but there is still some problems.

cmello commented 1 year ago

Oh, thank you very much for retrying the workflow. No worries!

sylvainfortin commented 1 year ago

CI issue should be fixed now. Can you rebase yet again please. This time rebase onto main branch since we are not maintaining the dev branch anymore. Thanks.