Skip to content

GH2685/2903: Integrate Cake.DotNetTool.Module #3207

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

Merged
merged 35 commits into from
Feb 27, 2021

Conversation

devlead
Copy link
Member

@devlead devlead commented Feb 27, 2021

Fixes #2685 and #2903

  • Filter out CI files (GitHub/AppVeyor/Recipe etc.)
  • Rebase into Cake repo
  • Move into Cake solution/src
  • Adhere to Cake code style
  • Load by default in Scripting & Frosting
  • Adapt/add integration tests
  • Warn if Cake.DotNetTool.Module referenced as module
  • Fix posix builds
  • Push to NuGet
  • Add Cake as owner of package

gep13 and others added 30 commits February 27, 2021 21:28
- In general, things are working
- When using --tool-path, something isn't quite working right
- Change name of project to Cake.DotNetTool.Module
- Switch to using tools folder by default
- Can switch to using Global using pre-processor
…sting

- Issue identified and corrected upstream in Cake.Recipe
…ool version

Previously, the Module wouldn't check to see what version of a Tool was
installed.  As a result, when a tool was already installed, even if a
newer version was requested, it wouldn't be installed.  This is really
down to the underlying tool and how it works, but smarts have now been
put into the module, to check installed version, against what is
requested, so that an uninstall is first executed, and then the requested
version is installed.
This is known issue with Cake, that will hopefully be addressed in the
future.
@augustoproiete augustoproiete self-requested a review February 27, 2021 20:37
@devlead devlead marked this pull request as ready for review February 27, 2021 20:38
Copy link
Member

@augustoproiete augustoproiete left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Tested with a number of .NET tools and it works as expected:

#tool dotnet:?package=GitVersion.Tool&version=5.1.2
#tool dotnet:?package=exceldna-unpack&version=2.1.0
#tool dotnet:?package=minver-cli&version=2.4.0
#tool dotnet:?package=dotnet-reportgenerator-globaltool&version=4.8.6

image

Test 1 - First run without any tools installed installs them as expected:

image

Test 2 - Second run with the tools already installed displays informational message that tools are already installed as expected

(perhaps something we could make verbose in a future PR?)

image

Test 3 - Deleted tools folder, added cake.config with different path for tools folder, installs as expected honoring the cake.config tools path

cake.config

[Paths]
Tools=./MyCustomTools
Addins=./MyCurtomAddins
Modules=./MyCustomModules

image

Test 4 - Including Cake.DotNetTool.Module in a Cake script now displays a warning explaining it's no longer needed

#module nuget:?package=Cake.DotNetTool.Module&version=1.0.1

image

@augustoproiete augustoproiete merged commit 4fc6d8c into cake-build:develop Feb 27, 2021
@augustoproiete
Copy link
Member

Thanks a lot for taking this over the line @devlead! And to @gep13 for the actual implementation!

Another successful incubator project that made it into the mainline 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Better dotnet tool integration
6 participants