-
Notifications
You must be signed in to change notification settings - Fork 656
[WIP] Add Major.Minor release date to compiled assembly #84
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
Conversation
As stated in Particular/NServiceBus#1968 the initial requirement would be "to provide hotfixes for older versions we need to keep the date stable within the same Major.Minor (ie use the date of the first release)". As discussed with @andreasohlund, the idea would be to modify the AssemblyInfoBuilder to make it generate an assembly The So, here's a first draft. One of the added tests (temporarily) dumps some version information per commit. The test repository is the same than the one described in #79
Below is a list of the latest reachable stable commits on master that should be used in order to extract the original release date. This reads as "When building Commit X (from branch Y), I should consider the commit pointed by VersionPoint major.minor.sha to identify the original release date.".
Although it seems to be working as expected for hotfixes, I'm not sure that this makes sense for the other branches. For instance, Commits I and K would rely on v1.2 whereas v1.3 would have been already released with commit H. However, I'm not sure to understand what would the I can think of two paths from here:
Thoughts? |
Since OrigininalDate is only relevant on master+hotfix I propose the following: Always generate the attribute with the Date property set to date of commit If last digit in semver isn't 0 (ie hotfix) go and find the corresponding merge/label on master to populate the OriginalDate property. Throw if not found If last digit is 0 set OriginalDate=Date For githubflow OriginalDate always == Date Thoughts? Sent from my iPhone
|
@andreasohlund i like it. and that simplifies the problem |
@andreasohlund First alpha release. With generation of the Proposed next steps:
|
@nulltoken works as expected. |
What is the next steps? (can you cleanup so that we can pull?) |
@nulltoken as discussed, go ahead and squash |
@andreasohlund Done. As I cleaned up the history and this feature is not backed up by tests, could you do a final pass of testing to make sure I didn't mess up anything, please? |
[WIP] Add Major.Minor release date to compiled assembly
Done, looks good! Sent from my iPhone
|
The same way we currently use https://github.com/Particular/Timestamp to add a special attribute to an assembly.
The date needs to be:
Examples:
If we release v1.0.0 on 10 May 2014 then the Timestamp is 10 May 2014
If we release v1.0.1 on 12 May 2014 then the Timestamp is 10 May 2014 (same as v1.0.0)
If we release v1.0.1+x on 15 May 2014 then the Timestamp is 10 May 2014 (same as v1.0.0)
If we release v1.1.0 on 20 May 2014 then the Timestamp is 20 May 2014