As discussed on slack channel gitversion 6 ideas channel:
gitversion.exe calculate command with -normalize switch to do git repo normalization logic before calculating.gitversion.exe calculate --normalize | gitversion buildservergitversion calculate to obtain variable values - where gitversion will be invoked as a local or global dotnet tool.Was there any talk about potential refactoring for the command line parsing? It's all hand made at the moment and I must admit I struggled more with figuring out how to incorporate a new switch/arg than how to incorporate a new feature.
There are 3 main flaws with it imo
I'd suggest something like https://github.com/commandlineparser/commandline which I've used in the past, but the gist of it is that it supports explicit command definitions (as opposed to chaining more if-statements), property binding, validation, free helptext, you name it.
We're currently considering System.Commandline
FWIW, I've used System.CommandLine and like it, although progress to a stable version seems slow.
One thing we should do for v6 is to make the path variable passed to our Docker containers obsolete. With only Linux images, this is easy by providing a smart Bash script as an ENTRYPOINT that feeds the gitversion executable with /repo.
I'm not sure how we can provide a smart ENTRYPOINT in a cross-platform way, though. We can of course write a .NET Core executable as an ENTRYPOINT, but that feels overly complex as executing other processes from .NET isn't trivial.
Something to cook our noodles.
@asbjornu at the moment we build only Linux images, we dropped the support for Windows as the images are too big and too long to build.
@arturcic, okay. That's good news! A clever entrypoint.sh should be possible, then. I can start hashing something out when time allows.
@asbjornu at the moment we build only Linux images, we dropped the support for Windows as the images are too big and too long to build.
Does that include the nano image?
We don't build for nano at the moment , there were some issues with it
This issue has been automatically marked as stale because it has not had recent activity. After 30 days from now, it will be closed if no further activity occurs. Thank you for your contributions.
Most helpful comment
We're currently considering System.Commandline