You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm willing to do the work if it is agreed upon that it is a good idea. I haven't looked into it in detail yet but I assume it would probably need some outstanding work like #1445 and #1422 to get wrapped up first. It would obviously require getting actual stable releases out to nuget.org again. 😄
First order of business would be picking the name of the package. I'm personally pretty confused on what all the various GitVersion related packages already on nuget.org are for so I think some care to pick a good meaningful is important. I like what Cake did in v0.30.0 and suggest GitVersion.Tool for the package name. It's not taken but there is an existing GitVersion.Tools which might be confusing.
The end result would be easily installing GitVersion on any platform that supports .NET core with the following command:
dotnet tool install -g GitVersion.Tool
Then you can run it from anywhere with this command:
dotnet gitversion
Reacted by Artur, Sebastian Karasek, Darrell, Gert Jansen van Rensburg, Simon Novak, José Simões and Ilia Tsvetkov
I'd favour dotnet gitversion just because chocolatey package already puts gitversion on the PATH so it might get a bit confusing if people are running gitversion as to which one is being used (chocolatey versus global tool) - where as dotnet gitversion makes it obvious.
@arturcic - this would definitely be a welcomed PR but you are right those issues you linked are high on the agenda right now for obvious reasons
This is now part of #1422. Try it out with: dotnet tool install -g --version 4.0.0-pullrequest1422-1625 --add-source https://ci.appveyor.com/nuget/gitversion-8nigugxjftrw GitVersion.CommandLine.DotNetCore.Tool
My personal preference for the tool Package Id to be something shorter and easier to remember though. :) Not a big deal because the end result once it's installed of dotnet gitversion is the exact same and that is easy enough to remember. :)
This works for me in Windows but not in Linux (Debian 9). It's the same LibGit2Sharp error I've seen before. I'll try to debug it but I'm a bit out of my depth.
System.TypeInitializationException: The type initializer for 'LibGit2Sharp.Core.NativeMethods' threw an exception. ---> System.DllNotFoundException: Unable to load shared library 'git2-b0d9952' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libgit2-b0d9952: cannot open shared object file: No such file or directory
at LibGit2Sharp.Core.NativeMethods.git_libgit2_init()
at LibGit2Sharp.Core.NativeMethods.InitializeNativeLibrary()
at LibGit2Sharp.Core.NativeMethods..cctor()
--- End of inner exception stack trace ---
at LibGit2Sharp.Core.NativeMethods.git_buf_free(GitBuf buf)
at LibGit2Sharp.Core.Proxy.ConvertPath(Func`2 pathRetriever)
at LibGit2Sharp.Repository.Discover(String startingPath)
at GitVersion.GitPreparer.GetDotGitDirectory() in C:\projects\gitversion\src\GitVersionCore\GitPreparer.cs:line 163
at GitVersion.GitPreparer.GetProjectRootDirectory() in C:\projects\gitversion\src\GitVersionCore\GitPreparer.cs:line 177
at GitVersion.ConfigurationProvider.Verify(GitPreparer gitPreparer, IFileSystem fileSystem) in C:\projects\gitversion\src\GitVersionCore\Configuration\ConfigurationProvider.cs:line 268
at GitVersion.Program.VerifyArgumentsAndRun()
Well it actually worked fine for me with the official Debian 9 based dotnet:2.1-sdk Docker image. It was failing for me in a newly set up Debian 9 VM. After debugging things it turns out it was actually finding the libgit2-b0d9952.so correctly but that library needs libcurl.so.4 which was not present. I installed it by running sudo apt-get install libcurl3 and it started working.
Unrelated to the error but while I was poking around debugging it I noticed some extra stuff in the package. content/GemAssets and contentFiles/any/netcoreapp2.1/GemAssets/.gitignore which I assume has something to do with the ruby gem and probably doesn't need to be included with the dotnet tool.
Hi just to voice my support for this, we are changing our build process over to be fully dotnet core compatible so we can build on linux and gitversion is our final hurdle with downloading tools via the dotnet tool install command line.
In regards to naming we currently use FAKE and Octopus Deploy Tools which have the package naming fake-cli and Octopus.DotNet.Cli respectively, so maybe something like GitVersion.DotNetCore.Cli is the way to go?
Activity
arturcic commentedon Aug 30, 2018
What about naming the package as
GitVersion.CommandLine.ToolorGitVersion.CommandLine.DotNetCore.Toolarodus commentedon Aug 31, 2018
@kll
The command would be just
gitversionwithout thedotnet.dazinator commentedon Sep 6, 2018
@arodus
According to https://docs.microsoft.com/en-us/dotnet/core/tools/global-tools it could be run either way depending on how it's written!
I'd favour
dotnet gitversionjust because chocolatey package already puts gitversion on the PATH so it might get a bit confusing if people are runninggitversionas to which one is being used (chocolatey versus global tool) - where asdotnet gitversionmakes it obvious.@arturcic - this would definitely be a welcomed PR but you are right those issues you linked are high on the agenda right now for obvious reasons
kll commentedon Sep 25, 2018
This is now part of #1422. Try it out with:
dotnet tool install -g --version 4.0.0-pullrequest1422-1625 --add-source https://ci.appveyor.com/nuget/gitversion-8nigugxjftrw GitVersion.CommandLine.DotNetCore.ToolMy personal preference for the tool Package Id to be something shorter and easier to remember though. :) Not a big deal because the end result once it's installed of
dotnet gitversionis the exact same and that is easy enough to remember. :)kll commentedon Sep 26, 2018
This works for me in Windows but not in Linux (Debian 9). It's the same LibGit2Sharp error I've seen before. I'll try to debug it but I'm a bit out of my depth.
arturcic commentedon Sep 26, 2018
please have a look here #1473
kll commentedon Sep 26, 2018
Well it actually worked fine for me with the official Debian 9 based dotnet:2.1-sdk Docker image. It was failing for me in a newly set up Debian 9 VM. After debugging things it turns out it was actually finding the
libgit2-b0d9952.socorrectly but that library needslibcurl.so.4which was not present. I installed it by runningsudo apt-get install libcurl3and it started working.Unrelated to the error but while I was poking around debugging it I noticed some extra stuff in the package.
content/GemAssetsandcontentFiles/any/netcoreapp2.1/GemAssets/.gitignorewhich I assume has something to do with the ruby gem and probably doesn't need to be included with the dotnet tool.TangoMikeOscar commentedon Oct 25, 2018
Hi just to voice my support for this, we are changing our build process over to be fully dotnet core compatible so we can build on linux and gitversion is our final hurdle with downloading tools via the
dotnet tool installcommand line.In regards to naming we currently use
FAKEandOctopus Deploy Toolswhich have the package namingfake-cliandOctopus.DotNet.Clirespectively, so maybe something likeGitVersion.DotNetCore.Cliis the way to go?arturcic commentedon Nov 11, 2018
Closed by #1528