Nightly builds

Dec 21, 2011 at 6:05 PM

The users of an open source project I am working on want to receive daily beta releases because the project is so extremely active. At the moment, I release it all manually (the beta) and only official releases are released via nuget.

However, with the new NuGet 1.6 being released that supports SemVer, I decided to put some time into a powershell script that gathers all my assemblies and the language files, and creates nuget packages for NET35, NET40, NET45, SL4, SL5, WP7 and WP7 Mango. As you can imagine, doing all this stuff manually is quite some work.

Anyway, I wrote the script and it all works, except that nuget doesn't seem to support nightly build versioning. What I want is to be able to use this:

2.4-beta.20111221 (or something like that)

The only solution that works now is this:

2.4.20111221-beta

However, when I am ready to release 2.4, I can't release it any longer because it falls back to 2.4.0. So, how should I deal correctly with nightly builds?

Dec 21, 2011 at 6:07 PM

For now, if I am working on say 2.4, I will use this versioning:

for beta releases: 2.3.20111221-beta

for official release: 2.4

It at least solves my problem for now.

Developer
Dec 21, 2011 at 6:13 PM

AFAIK, it was NuGet 's intention to be fully compliant with semver. That's what I understood from the pre-release discussion here http://nuget.codeplex.com/discussions/277189

If you read haacked's post here http://bit.ly/sAHzhB (in retrospect of course, this was before the release), where the question was raised to patch semver to support a 4th build number as well, also for prereleases, I think you should be able to use something like:

2.4.0-beta.20111221

If you look at rule #10 and #11 on semver.org, you'll notice that semver RC1 supports this.

If the above version number is not working, I'd assume this is either a bug in NuGet, or an underlying reason to deviate from semver (which I'm curious to learn why).

Developer
Dec 21, 2011 at 7:44 PM
Edited Dec 21, 2011 at 11:50 PM

Let me correct my previous comment, as I misread the semver rules myself :-) (Thanks pranav_km for pointing out)

Semver allows you to use the following syntax:

2.4.0-beta+20111221

The plus sign indicates the start of the build number information.

My previous comment used a dot instead, indicating that 20111221 is still part of the prerelease information.

The plus sign notation is supported by NuGet, so there's no issue :-)

Dec 21, 2011 at 7:57 PM

No, we don't support the + sign either. The + sign came in very late in the semver spec when we were close to releasing 1.6 and we decided not to support it.

Developer
Dec 21, 2011 at 8:07 PM
dotnetjunky wrote:

No, we don't support the + sign either. The + sign came in very late in the semver spec when we were close to releasing 1.6 and we decided not to support it.

Any plans to support this + sign annotation for build numbers in NuGet vNext?

I was already wondering why http://docs.nuget.org/docs/Reference/Versioning did not mention the support for build number information :-)

Dec 21, 2011 at 8:20 PM
There is no plan to support it in vNext.

Sent from my Super Windows Phone

From: XavierDecoster
Sent: 12/21/2011 1:09 PM
To: Luan Nguyen
Subject: Re: Nightly builds [nuget:283794]

From: XavierDecoster

dotnetjunky wrote:

No, we don't support the + sign either. The + sign came in very late in the semver spec when we were close to releasing 1.6 and we decided not to support it.

Any plans to support this + sign annotation for build numbers in NuGet vNext?

I was already wondering why http://docs.nuget.org/docs/Reference/Versioning did not mention the support for build number information :-)

Coordinator
Dec 21, 2011 at 8:52 PM

Hmmm, maybe I'll do that as a pull request. :)

Developer
Dec 22, 2011 at 12:01 AM
haacked wrote:

Hmmm, maybe I'll do that as a pull request. :)

Would be great! :-)

Created a work item here, so it is logged and people can vote for it and indicate how much they value this feature.