Skip to content

How to invalidate cache file so that it's either ignored or deleted before calculation? #798

Closed
@PreetSangha

Description

@PreetSangha
next-version: 3.10.2
branches: {}
mode: ContinuousDeployment
continuous-delivery-fallback-tag: Alpha
branches: 
  develop:
    mode: ContinuousDeployment
    tag: Alpha
    increment: Patch
    prevent-increment-of-merged-branch-version: true
    track-merge-target: false

  release[/-]:
    mode: ContinuousDeployment
    #tag: XXX
    increment: Patch
    prevent-increment-of-merged-branch-version: false
    track-merge-target: false

I was getting this output before I used the log to determine that there was a cache file

C:\Dev\Development\ayata\ProjectName>C:\Dev\GitVersion\build\GitVersionTfsTaskBuild\GitVersionTask\GitVersion.exe

     {
      "Major":3,
      "Minor":10,
      "Patch":2,
      "PreReleaseTag":"v3-10-0.0",                            
      "PreReleaseTagWithDash":"-v3-10-0.0",
      "PreReleaseLabel":"v3-10-0",
      "PreReleaseNumber":0,
      "BuildMetaData":"",
      "BuildMetaDataPadded":"",
      "FullBuildMetaData":"Branch.Release/v3.10.0.Sha.15beae0f6cac4b2c850334af9caf6dd1fbd65f6a",
      "MajorMinorPatch":"3.10.2",
      "SemVer":"3.10.2-v3-10-0.0",
      "LegacySemVer":"3.10.2-v3-10-0-0",
      "LegacySemVerPadded":"3.10.2-v3-10-0-0000",
      "AssemblySemVer":"3.10.2.0",
      "FullSemVer":"3.10.2-v3-10-0.0",
      "InformationalVersion":"3.10.2-v3-10-0.0+Branch.Release/v3.10.0.Sha.15beae0f6cac4b2c850334af9caf6dd1fbd65f6a",
      "BranchName":"Release/v3.10.0",
      "Sha":"15beae0f6cac4b2c850334af9caf6dd1fbd65f6a",
      "NuGetVersionV2":"3.10.2-v3-10-0-0000",
      "NuGetVersion":"3.10.2-v3-10-0-0000",
      "CommitsSinceVersionSource":0,
      "CommitsSinceVersionSourcePadded":"0000",
      "CommitDate":"2016-02-18"
    }

After deleting the cache file I got this version calculation

C:\Dev\Development\ayata\ProjectName>del C:\Dev\Development\ayata\ProjectName\.git\gitversion_cache\2AFD573A72D9897F57F4051974C54865B8B58B66.yml

    C:\Dev\Development\ayata\ProjectName>C:\Dev\GitVersion\build\GitVersionTfsTaskBuild\GitVersionTask\GitVersion.exe
    {
      "Major":3,
      "Minor":10,
      "Patch":2,
      "PreReleaseTag":"beta.0",
      "PreReleaseTagWithDash":"-beta.0",                        << ------------------------------
      "PreReleaseLabel":"beta",
      "PreReleaseNumber":0,
      "BuildMetaData":"",
      "BuildMetaDataPadded":"",
      "FullBuildMetaData":"Branch.Release/v3.10.0.Sha.15beae0f6cac4b2c850334af9caf6dd1fbd65f6a",
      "MajorMinorPatch":"3.10.2",
      "SemVer":"3.10.2-beta.0",
      "LegacySemVer":"3.10.2-beta0",
      "LegacySemVerPadded":"3.10.2-beta0000",
      "AssemblySemVer":"3.10.2.0",
      "FullSemVer":"3.10.2-beta.0",
      "InformationalVersion":"3.10.2-beta.0+Branch.Release/v3.10.0.Sha.15beae0f6cac4b2c850334af9caf6dd1fbd65f6a",
      "BranchName":"Release/v3.10.0",
      "Sha":"15beae0f6cac4b2c850334af9caf6dd1fbd65f6a",
      "NuGetVersionV2":"3.10.2-beta0000",
      "NuGetVersion":"3.10.2-beta0000",
      "CommitsSinceVersionSource":0,
      "CommitsSinceVersionSourcePadded":"0000",
      "CommitDate":"2016-02-18"
    }

So I was wondering how I can invalidate the file without having to discover it from the folder first please.

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