Skip to content

Allow repo normalization to be disabled #1701

@mycroes

Description

@mycroes

Currently repo normalization is triggered when a buildserver is detected. I'm not sure what the original intention of repo normalization is, but for me it's actually making things worse. I use Jenkins to build NuGet packages for every change made in Gerrit. These changes are normally against the develop branch, but when Jenkins is building the commits they're not yet merged. Because they are intended for merging into develop I let Jenkins checkout the change into a local develop branch as well. However, when GitVersion does normalization, it will reset develop to origin/develop, causing the dreaded HEAD had moved exception (which makes sense, because the local develop is always newer than origin/develop in this scenario).

For now I managed to work around this by clearing the JENKINS_URL environment variable, which causes GitVersion not to detect any buildserver and will let it skip repo normalization and use what Jenkins has provided. This way I actually get the expected version, but it would actually be a lot nicer if GitVersion would just stick to resolving the version instead of deciding what my repository should look like.

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