-
Notifications
You must be signed in to change notification settings - Fork 69
Set the file version environment variable #192
Conversation
That's a very wacky versioning scheme. Why not just YYMMDD? Or YYYYMMDD? Also, why is it always |
File versions are capped at 65k (http://blogs.msdn.com/b/msbuild/archive/2007/01/03/why-are-build-numbers-limited-to-65535.aspx). So most leading year based schemes are broken. |
|
||
string version = "0"; | ||
|
||
// If the computer date is set before the start date, then the version is 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems pretty unrealistic.
⌚ |
I suggested the wacky scheme to give a maximum number of versions beyond the typical six year limitation we have today with the old .NET scheme |
Updated. You should be able to specify the pattern now with a wildcard. If for example MVC want v6, then it can set the pattern to |
var assemblyFileVersion = E("DNX_ASSEMBLY_FILE_VERSION"); | ||
if (string.IsNullOrEmpty(assemblyFileVersion)) | ||
{ | ||
assemblyFileVersion = "1.0.*.0"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does Sake support comments? Should we document how * is used?
a67479d
to
8f26016
Compare
Changed the logic to only set the number that we increment. DNX does all the rest |
8f26016
to
188f5e8
Compare
This change is to set an environment variable for the AssemblyFileVersion attribute.
The version has 5 characters, the first 3 are the number of months since 2015/1/1 and the last 2 are the day of the month. @joeloff suggested this format since it is used in other places. For example, today's version is 00327.
Please review: @joeloff @pranavkm
@Eilon, @davidfowl are you okay with the version in this format?
There is a DNX change coming soon that will actually write the attribute.
Part of the fix for aspnet/dnx#1504