Skip to content

Conversation

hmemcpy
Copy link
Contributor

@hmemcpy hmemcpy commented Jul 21, 2014

Initial work to support issue #224.

This adds support for specifying the filename as: /updateassemblyinfo ..\src\CommonAssemblyInfo.cs or /updateassemblyinfo "C:\src\CommonAssemblyInfo.cs".

@@ -44,6 +43,19 @@ public AssemblyInfoFileUpdate(Arguments args, string workingDirectory, Dictionar
}
}

static IEnumerable<string> GetAssemblyInfoFiles(string workingDirectory, Arguments args)
{
if (args.UpdateAssemblyInfoFileName != null)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just return Directory.GetFiles(workingDirectory, args.UpdateAssemblyInfoFileName ?? "AssemblyInfo.cs", SearchOption.AllDirectories);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this could work, I also did the Path.GetFullPath to handle both relative and absolute paths...
Though it also might be useful to provide a relative root directory, e.g. update all assemblyinfo.cs under this specific dir (and not in the entire repository)

@JakeGinnivan
Copy link
Contributor

I think the args need to be added to the console help still as well

JakeGinnivan added a commit that referenced this pull request Aug 8, 2014
Support updating a single common AssemblyInfo.cs
@JakeGinnivan JakeGinnivan merged commit a78ef71 into GitTools:master Aug 8, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants