Skip to content

Add option to disable the complete GitVersion.Task for building with no existing repositories #1723

@DerAlbertCom

Description

@DerAlbertCom

Hi,

since v5.0.0-beta-3-27 it is not possible to use a GitVersion with tools like NCrunch, which copies the source files for building and don't have a copy of the git repository.

@onovotny fixed this in #1193 very NCrunch Specific, these changes are not in the current version anymore. Maybe because of NCrunch is too specific.

Now i must disable the GitVersion.Task with something like

  <PropertyGroup Condition="'$(NCrunch)' == '1'">
    <WriteVersionInfoToBuildLog>false</WriteVersionInfoToBuildLog>
    <UpdateAssemblyInfo>false</UpdateAssemblyInfo>
    <GenerateGitVersionInformation>false</GenerateGitVersionInformation>
    <GetVersion>false</GetVersion>
    <GenerateGitVersionWixDefines>false</GenerateGitVersionWixDefines>
    <UpdateVersionProperties>false</UpdateVersionProperties>
    <UseFullSemVerForNuGet>false</UseFullSemVerForNuGet>
  </PropertyGroup>

which is plenty of stuff, and may change over time.

So I propose a general off switch. So i can do something like.

  <PropertyGroup Condition="'$(NCrunch)' == '1'">
    <DisableGitVersionTask>true</DisableGitVersionTask>
  </PropertyGroup>

I willing to provide a PR, but would like to check the naming, or if there is a strong "we will never do that" within the team.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions