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

Add more data to AssemblyVersionInformation class #822

Closed
allykzam opened this issue May 28, 2015 · 3 comments
Closed

Add more data to AssemblyVersionInformation class #822

allykzam opened this issue May 28, 2015 · 3 comments

Comments

@allykzam
Copy link
Contributor

I currently populate my AssemblyInfo files with a smattering of data (most of it provided by default with the ProjectScaffold build.fsx, but with a couple extra values tossed in). The helpful AssemblyVersionInformation type definition provided with C# and F# classes (I may be mistaken, but I don't see anything generating this class for VB under CreateVisualBasicAssemblyInfoWithConfig, despite the comments for it indicating otherwise) currently provides one value.

With a few changes to Fake.AssemblyInfoFile.Attribute, and some matching changes in each of the Create<Language>AssemblyInfoWithConfig functions, would it be possible to include all of the data populated into the AssemblyInfo file? Hopefully including the metadata values?

I'm happy to prototype & PR the code changes for this, but I'm not sure what documentation would need to be updated with it.

@allykzam
Copy link
Contributor Author

My quick prototype here: master...amazingant:add-data-to-AssemblyVersionInformation

The full FAKE solution refuses to build on my machine, so I'm not sure if there's any tests I've invalidated, but after swapping out FakeLib.dll in the right spots and building one of my projects, it works well:

namespace System
open System.Reflection

[<assembly: AssemblyTitleAttribute("Testing")>]
[<assembly: AssemblyProductAttribute("Testing")>]
[<assembly: AssemblyDescriptionAttribute("Testing a change to FAKE")>]
[<assembly: AssemblyMetadataAttribute("githash","7bcb77")>]
[<assembly: AssemblyVersionAttribute("0.1.0")>]
[<assembly: AssemblyFileVersionAttribute("0.1.0")>]
[<assembly: AssemblyInformationalVersionAttribute("0.1.0-beta")>]
do ()

module internal AssemblyVersionInformation =
    let [<Literal>] AssemblyTitle : System.String = "Testing"
    let [<Literal>] AssemblyProduct : System.String = "Testing"
    let [<Literal>] AssemblyDescription : System.String = "Testing a change to FAKE"
    let [<Literal>] AssemblyMetadata_githash : System.String = "7bcb77"
    let [<Literal>] AssemblyVersion : System.String = "0.1.0"
    let [<Literal>] AssemblyFileVersion : System.String = "0.1.0"
    let [<Literal>] AssemblyInformationalVersion : System.String = "0.1.0-beta"

Unless there's a reason not to, I'll take some time later to add this to CreateVisualBasicAssemblyInfoWithConfig as well.

@dsyme
Copy link
Collaborator

dsyme commented Oct 1, 2016

@amazingant Can you send a PR for this?

@allykzam
Copy link
Contributor Author

allykzam commented Oct 1, 2016

@dsyme I will have to take a look at re-implementing it on Monday morning. I am not sure how much of FAKE has changed in 16 months (knowing forki, probably quite a bit), but GitHub is telling me that the changes cannot be cleanly merged anymore.

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

No branches or pull requests

2 participants