palantir / gradle-git-version

a Gradle plugin that uses `git describe` to produce a version string.
Apache License 2.0
382 stars 76 forks source link

GitVersion.yml is ignored #818

Open nauni77 opened 4 months ago

nauni77 commented 4 months ago

I use the GitVersion.yml file to configure the result of GitVersion command. For example I always add a

branches:
  release:
    increment: Patch

After releasing a 0.1.0 and additional commits - the git-version-plugin produces a 0.1.0-37-g2cf8fe5.dirty, but I expect a 0.1.1-37-g2cf8fe5.dirty. How can I tell the plugin to take care for the GitVersion.yml file to get the same result as GitVersion command?

Output of the gitversion command:

$ gitversion
{
  "Major": 0,
  "Minor": 1,
  "Patch": 1,
  "PreReleaseTag": "beta.1",
  "PreReleaseTagWithDash": "-beta.1",
  "PreReleaseLabel": "beta",
  "PreReleaseLabelWithDash": "-beta",
  "PreReleaseNumber": 1,
  "WeightedPreReleaseNumber": 30001,
  "BuildMetaData": 38,
  "BuildMetaDataPadded": "0038",
  "FullBuildMetaData": "38.Branch.releases-0.1.Sha.2cf8fe5d8af73aab9582e1bc3a2dac901795c897",
  "MajorMinorPatch": "0.1.1",
  "SemVer": "0.1.1-beta.1",
  "LegacySemVer": "0.1.1-beta1",
  "LegacySemVerPadded": "0.1.1-beta0001",
  "AssemblySemVer": "0.1.1.0",
  "AssemblySemFileVer": "0.1.1.0",
  "FullSemVer": "0.1.1-beta.1+38",
  "InformationalVersion": "0.1.1-beta.1+38.Branch.releases-0.1.Sha.2cf8fe5d8af73aab9582e1bc3a2dac901795c897",
  "BranchName": "releases/0.1",
  "EscapedBranchName": "releases-0-1",
  "Sha": "2cf8fe5d8af73aab9582e1bc3a2dac901795c897",
  "ShortSha": "2cf8fe5",
  "NuGetVersionV2": "0.1.1-beta0001",
  "NuGetVersion": "0.1.1-beta0001",
  "NuGetPreReleaseTagV2": "beta0001",
  "NuGetPreReleaseTag": "beta0001",
  "VersionSourceSha": "f0ef445a2b8a9b55dacace66d6568e420288c213",
  "CommitsSinceVersionSource": 38,
  "CommitsSinceVersionSourcePadded": "0038",
  "UncommittedChanges": 2,
  "CommitDate": "2024-07-15"
}

Thanks in advance, Oli