Navigation Menu

Skip to content
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

Output CI version info to console #446

Closed
jnm2 opened this issue Aug 7, 2018 · 1 comment
Closed

Output CI version info to console #446

jnm2 opened this issue Aug 7, 2018 · 1 comment
Assignees
Milestone

Comments

@jnm2
Copy link
Collaborator

jnm2 commented Aug 7, 2018

I'm using Cake to pull the latest prerelease from the MyGet feed via #tool nuget:https://myget.org/f/nunit/?package=NUnit.ConsoleRunner&prerelease. I want the version to float, but I want to be able to know after the fact which MyGet build of NUnit Console was used in my CI builds. For example, the Cake script ran against 3.9.0-dev-04024 but I can't see that by reading my CI log:

NUnit Console Runner 3.9.0
Copyright (c) 2018 Charlie Poole, Rob Prouse

To fix this, can we have the AppVeyor CI build patch AssemblyInfo.cs with the current build number? I'd be happy to do it if you like the idea. (Where I work, we do AssemblyInfo.cs patching on projects where we can't move to the new SDK yet and pass an MSBuild property.)

Then, we'd replace this:

private static void WriteHeader()
{
Assembly executingAssembly = Assembly.GetExecutingAssembly();
string versionText = executingAssembly.GetName().Version.ToString(3);

With this:

string versionText = FileVersionInfo.GetVersionInfo(
    executingAssembly.ManifestModule.FullyQualifiedName).ProductVersion;
@ChrisMaddock
Copy link
Member

Fine by me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants