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

Cleanup cake file, add targets, fix for iOS Pair #7241

Merged
merged 17 commits into from May 18, 2022
Merged

Cleanup cake file, add targets, fix for iOS Pair #7241

merged 17 commits into from May 18, 2022

Conversation

PureWeen
Copy link
Contributor

@PureWeen PureWeen commented May 16, 2022

Description of Change

  • Deleted all of the tasks in build.cake AFAIK none of these are currently used. At a later point if we need to re-enable the CG tasks we can add them back in using more current tools
  • Added Task VS: to procure dotnet, builds maui, opens maui.slnf
    • Added --clean argument which will delete the bin/obj folders
    • Added --sln argument so you can specify a different sln file you want VS to open with the local install of dotnet.
      • If you also want to force another pack you can add a --pack.
    • The VS target will now open VS regardless of failures in the code. If you want to just see build errors in the CLI then you can run the dotnet-buildtasks target instead of the VS target
  • Added some code that outputs a dotnet-sdk-version.txt file with the dotnet version. iOS Pair to mac currently needs this so it can download the correct dotnet version

Once this is merged I'll updated development.md because that's probably going to be a bit of a discussion.

EXAMPLE

Install dotnet, pack maui, and open external Solution. This is useful for validating a PR against a users Repro
dotnet cake --sln="<download_directory>\MauiApp2\MauiApp2.sln" --target=VS --pack

Install dotnet and open external Solution. This is useful for validating a PR against a users Repro. If you've already packed MAUI and don't want it to run pack again
dotnet cake --sln="<download_directory>\MauiApp2\MauiApp2.sln" --target=VS

Install dotnet, delete all bin/obj, open external Solution.
dotnet cake --sln="<download_directory>\MauiApp2\MauiApp2.sln" --target=VS --clean

@PureWeen PureWeen marked this pull request as draft May 16, 2022
@PureWeen PureWeen marked this pull request as ready for review May 16, 2022
eng/cake/dotnet.cake Show resolved Hide resolved
eng/vs-dogfood.ps1 Outdated Show resolved Hide resolved
eng/cake/dotnet.cake Show resolved Hide resolved
eng/cake/dotnet.cake Outdated Show resolved Hide resolved
eng/cake/dotnet.cake Show resolved Hide resolved
eng/cake/dotnet.cake Show resolved Hide resolved
@rmarinho
Copy link
Contributor

rmarinho commented May 17, 2022

Love this, my only request is can we have a option that installs workloads, builds the sln and even if there0s erros it still opens VS with sln. sometimes getting to test new maestro bump the api breaks, and when I build it doesn't open vs with the local workloads because the sln failed to build, but I wanted to fix the API on VS, not manually. SO maybe a --force option?

@PureWeen
Copy link
Contributor Author

PureWeen commented May 17, 2022

@rmarinho good point. I feel like just opening VS should always be the default :-) That's the point of the cake script anyway right? If you don't want to open VS then just run cli commands

eng/cake/helpers.cake Outdated Show resolved Hide resolved
eng/cake/helpers.cake Outdated Show resolved Hide resolved
eng/cake/dotnet.cake Outdated Show resolved Hide resolved
eng/cake/dotnet.cake Outdated Show resolved Hide resolved
eng/cake/dotnet.cake Outdated Show resolved Hide resolved
@Eilon Eilon added the area/infrastructure 🏗️ label May 17, 2022
Copy link
Contributor

@mattleibow mattleibow left a comment

Looks good. Probably need verify that the nugets have all the same content after CI is done just to be really sure.

@rmarinho rmarinho merged commit cb2014b into main May 18, 2022
23 checks passed
@rmarinho rmarinho deleted the cleanup_cake branch May 18, 2022
@pictos pictos mentioned this pull request Jun 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants