[Rabbit-dev] Ant build script for RabbIT 4.2

Mindaugas Žakšauskas mindas at gmail.com
Tue Oct 27 00:08:10 CET 2009


My evening regex exercise:

Input string:
public static final String VERSION = "RabbIT proxy version 4.2";

Regex to get major/minor version ("4.2"): "[^ ]*$"
Regex to get minor version ("2"): "[^\\.]*$"
Regex to get major version ("4"): "\\d(?=\\.)"

This then needs to be put into a class, which Ant executes and sets
relevant variables.
All doable but looks like shooting a sparrow with a cannon (and what
if VERSION format will change?). Overengineering sucks.

It's probably easier to keep this out of main trunk (contrib, anyone?)
and put a big warning for users so they don't forget to change the
numbers.

m.

On Sun, Oct 25, 2009 at 7:57 PM, Robert Olofsson
<robert.olofsson at khelekore.org> wrote:
> On Sun, 25 Oct 2009 19:30:58 +0000
> Mindaugas Žakšauskas <mindas at gmail.com> wrote:
>
>> I have only placed version numbers in the XML only because didn't have
>> an idea what the primary source is.
>
> For my r4dist script (not part of the source) it checks the VERSION
> constant in HttpProxy (but may also append any "-preX" that I supply).
>
> Getting the version from HttpProxy is the correct thing I think.
>
> /robo
>
> _______________________________________________
> Rabbit-dev mailing list
> Rabbit-dev at khelekore.org
> http://khelekore.org/cgi-bin/mailman/listinfo/rabbit-dev
>




More information about the Rabbit-dev mailing list