apereo / dotnet-cas-client

Apereo .NET CAS Client
Apache License 2.0
234 stars 172 forks source link

Feature/issue 58 #59

Closed phantomtypist closed 7 years ago

phantomtypist commented 7 years ago

To test run the build script on your machine, and what the build server would also run, just open a command prompt from the root of the cloned repo on your machine and type "build", then hit the Enter key on your keyboard. The compiled output from the project will be in the "build" folder in the repo and the NuGet package artifact will show up in the "deploy" folder in the repo.

phantomtypist commented 7 years ago

This resolves issue https://github.com/apereo/dotnet-cas-client/issues/58, which will allow us to eventually complete issues https://github.com/apereo/dotnet-cas-client/issues/56 and https://github.com/apereo/dotnet-cas-client/issues/54

mmoayyed commented 7 years ago

Looks great to me, thank you.

One question so I learn this better: does the nuget.exe file actually need to exist in the repo? is there not a plugin of some kind that can automatically pull it down and build the project appropriately?

phantomtypist commented 7 years ago

Good question.

It never used to have any bootstrapping capability. You used to have to at minimum have nuget installed on your computer in order to pull down the packages, including FAKE itself. That meant that you'd also need to install nuget on the server and also make sure any developer also had it installed and configured. By including it in the repo, it guaranteed that you could build the solution anywhere without external dependencies needing to already be installed on whatever machine the build was taking place on.

So in essence, FAKE has a minimum dependency of nuget.exe being somewhere on the machine you are running the build on.

It looks like in the next version of FAKE coming out (v5) they are including a bootstrapper (both PowerShell and .sh script.) CAKE bootstraps itself in a similar manor with those two bootstrapping options.

I guess what I can do is convert the batch script to a PowerShell script and have it download nuget instead of including it in the repository. Never tried it, but shouldn't be too hard.

phantomtypist commented 7 years ago

Made a few minor changes.

TLDR: nuget.exe is now pulled down during build instead of stored in repo tools folder.

See commit messages for full details on changes made... there were some minor ones besides the nuget.exe change.

serac commented 7 years ago

+1