Closed matkoch closed 7 years ago
@matkoch You will need to clear the folder manually before the new version will be downloaded.
@patriksvensson Shouldn't the #tool
directive always pick the highest possible package, if no version was specified? I think that makes sense.
If not, it would violate consistency/determinism. Suppose you have two machines with the same script, but different tool versions. Sounds like a big pitfall to me.
Update
I've just checked, when prerelease
was first in place, and an actual prerelease package was installed in tools folder, when I then remove prerelease
from the #tool
directive, it still uses the prerelease package. Sorry, but this is really strange 🙂
@matkoch Not strange. You might notice that the tools folders are not versioned. We simply assume that the versions are correct. There is an issue for fixing all this, but nothing that is being actively worked on.
@patriksvensson Is there any progress on this? I recently started with Cake build and it seems quite interesting and we would like to replace psake with Cake build. This issue is somehow blocking me. Is there a workaround? For example an automatism to delete the tools folder upfront?
Closing as a duplicate of https://github.com/cake-build/cake/issues/753
For anyone interested in this issue, there's an easy workaround. I just stick this in my PowerShell bootstraper:
# Delete the tools and addins folders
Remove-Item $TOOLS_DIR\* -Force -Recurse -ErrorAction Ignore
You can make it more specific too if you know it's only one tool or addin you want to ensure is always fresh.
@daveaglick thanks, -ErrorAction Stop
would be better I think. Otherwise you could have strange side effects again.
What You Are Seeing?
Tool "GitVersion" was not updated to v4.0.0-betaxxxx.
What is Expected?
An update.
What version of Cake are you using?
Latest I guess on Win10/x64.
How Did You Get This To Happen? (Steps to Reproduce)
#tool "nuget:?package=GitVersion.CommandLine"
#tool "nuget:?package=GitVersion.CommandLine&prerelease"
tools
folder was still the stable releaseThis hurts probably the most with build servers.