-
Notifications
You must be signed in to change notification settings - Fork 658
Description
I'm trying to specify the name of my assemblyinfo. The commandline help states that
AssemblyInfo updating
/updateassemblyinfo
Will recursively search for all 'AssemblyInfo.cs' files in the git repo and update them
/updateassemblyinfofilename
Specify name of AssemblyInfo file. Can also /updateAssemblyInfo GlobalAssemblyInfo.cs as a shorthand
So basically, I should be able to do one of the following:
>GitVersion.exe /updateassemblyinfo true /updateassemblyinfofilename SharedAssemblyInfo.cs
>GitVersion.exe /updateassemblyinfo /updateassemblyinfofilename SharedAssemblyInfo.cs
>GitVersion.exe /updateassemblyinfo SharedAssemblyInfo.cs
But whenever I try to include the /updateassemblyinfofilename
parameter, I get an error:
Failed to parse arguments: /updateassemblyinfofilename ....
Looking into the code for the argument parser, I can't see that the updateassemblyinforfilename
-parameter is implemented at all.
That wouldn't be a large problem, except that the VsoTask is implemented in a way that it's impossible to use this form, since it uses a checkbox for specifying the updateassemblyinfo
-parameter. If I try to override this by not checking the 'Update AssemblyInfo's'-checkbox and then specify /updateassemblyinfo nameofassemblyinfo.cs
as an extra argument, the task fails since the argument is added twice:
2015-08-18T11:42:34.3961389Z Failed to parse arguments: C:\a\4386bae5\Finale /output buildserver /updateAssemblyInfo false /nofetch /updateAssemblyInfo SharedAssemblyInfo.cs
2015-08-18T11:42:34.3961389Z Could not parse command line parameter 'SharedAssemblyInfo.cs'.
So there are multiple possible bugs/shortages/inconsistencies here, depending how it should work:
For the commandline tool:
-
updateassemblyinforfilename
-argument not implemented in ArgumentParser.cs, or - non-existing
updateassemblyinforfilename
-argumente documented in HelpWriter.cs
And for the VsoTask:
- don't output
updateassemblyinfo
argument if false, to allow for override in 'additional arguments', or - don't output
updateassemblyinfo
argument if it's given in 'additional arguments' - don't use apostrophe in 'Update AssemblyInfo's' label... 😉