Skip to content

Support updating a single common AssemblyInfo.cs #227

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 8, 2014
Merged

Support updating a single common AssemblyInfo.cs #227

merged 2 commits into from
Aug 8, 2014

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