Skip to content

[Feature] - V6 Refactoring #2262

Closed
Closed
@dazinator

Description

@dazinator

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 - where gitversion 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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions