Skip to content

Don't add extra debug info for /updateassemblyinfo #843

@dcorriveau-omniscient

Description

@dcorriveau-omniscient

Hi,

I'm using GitVersion from PS scripts (psake) for my build process. Before "MSBuilding", I call
gitversion /updateassemblyinfo true to update all the AssemblyInfo files in the solution. I would have liked to be able to to that, get the result, parse the JSON and then get access to all the variables I need to use later on without having to call gitversion again. It would work perfectly fine if it wouldn't have been for the Found 3 files debug line that is appended to the JSON result when running updateassemblyinfo. Looks like this:

{
  "Major":1,                                                                                     
  "Minor":6,                                                                                     
  "Patch":17,                                                                                    
  ...
  "CommitsSinceVersionSourcePadded":"0006",                                                      
  "CommitDate":"2016-04-26"                                                                      
}                                                  
Found 3 files

So now I have to either remove that line before I can parse the JSON or call /showvariable as a following command to get the variables I want to use in the next steps.

  1. Is there a /quiet switch or something I can do to prevent outputting those debug info ? (looking at AssemblyInfoFileUpdate.cs I don't think I could prevent this at the moment).
  2. Are you doing some kind of optimization so that once gitversion has been run once and the repo hasn't changed, the various version info aren't recalculated every time we call gitversion ? (I could check the source code to find out but if you can answer this it would be great).

Thank you !

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