From murdoch at stats.uwo.ca  Sun Nov 28 19:42:58 2004
From: murdoch at stats.uwo.ca (Duncan Murdoch)
Date: Sun Nov 28 19:42:15 2004
Subject: [Rd] Version names
In-Reply-To: <loom.20041128T190755-473@post.gmane.org>
References: <loom.20041128T190755-473@post.gmane.org>
Message-ID: <bl6kq05o6vuscam0rrlg00ndvchi68jals@4ax.com>

On Sun, 28 Nov 2004 18:09:20 +0000 (UTC), Gabor Grothendieck
<ggrothendieck@myway.com> wrote:

>
>
>I have Windows XP build scripts that look for R in a variety
>of folders and if multiple ones are found, takes the last
>one.  For example, I currently have the following 
>in \Program Files\R :
>
>	rw1060
>	rw1062
>	rw1071
>	rw1071beta
>	rw1081
>	rw1090
>	rw1090dev
>	rw1091
>	rw1091pat
>	rw2000
>	rw2001beta
>
>Note that it currently correctly gets rw2001beta but if I
>add rw2001 then it will not pick it up since rw2001beta
>would continue to sort after it.
>
>I tried using dates in my scripts to pick out the right one
>but realized that it was somewhat error prone and decided to
>move back to ordering by the names.
>
>I wonder if a naming convention could be adopted that ensured
>that the names sort in order.  For example,
>
>	rw2010a - alpha, i.e. development version (previously rw2010dev)
>	rw2010b - beta version (previously rw2001beta)
>	rw2010f - final version (previously rw2010)
>	rw2010p - patched version (previously rw2010pat)

That would work.  Use the rename command, and you've got it.

Another possibility is to have your build script split up the name and
apply a custom sort order to it.

The pattern is:

"rw" + version number + suffix

The suffices appear in this order:  "dev", "alpha", "beta", "", "pat"
(where not all appear, e.g. "dev" never appears for a minor release,
and sometimes "alpha" is skipped).

Duncan Murdoch


[Rd] Version names
Duncan Murdoch