Closed
Description
Refactoring to improve composability and allow extensibility
As discussed on slack channel gitversion 6 ideas channel:
- Move version calculation logic behind
gitversion.exe calculate
command with-normalize
switch to do git repo normalization logic before calculating. - Move logic to detect native supported build servers and set environment variables behind a new command which is written in the style expected for "gitversion tools" e.g it takes version variables in STDIN and writes them to STDOUT e.g
gitversion.exe calculate --normalize | gitversion buildserver
- Refactor gitversion msbuild task to be changed to invoke
gitversion calculate
to obtain variable values - wheregitversion
will be invoked as a local or global dotnet tool. - Documentation around how to write a tool for use with gitversion - should be simply a case of stating that the tool should take variables in STDIN and write them to STDOUT for other tools to use onwards in the pipeline as a convenience (if the tool doesn't have any useful STDOUT of it's own).