[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-smalltalk] Version number in star packages
From: |
Gwenael Casaccio |
Subject: |
Re: [Help-smalltalk] Version number in star packages |
Date: |
Fri, 01 Jan 2010 12:19:00 +0100 |
On Thu, 2009-12-31 at 00:55 +0100, Paolo Bonzini wrote:
> On 12/30/2009 11:15 PM, Gwenael Casaccio wrote:
> > + parseVersion: aString [
> > + <category: 'version parsing'>
> > +
> > + | tokens |
> > + (tokens := aString tokenize: '\.') size = 3 ifFalse: [ self error: 'Bad
> > version string : ', aString, ' should be xx.yy.zz' ].
> > + self version: (Version major: tokens first asInteger minor: tokens
> > second asInteger patch: tokens third asInteger)
> > + ]
>
> This should:
>
> 1) use #subStrings: or alternatively a single regex match
>
> ^(\d+)\.(\d+)(?:\.(\d+))$
>
> instead of tokenize.
>
> 2) be in Version class>>#fromString:
>
> 3) accept a version like 1.0 and change it to 1.0.0 (see regex above).
>
> Otherwise looks fine, filtering of prerequisites based on their version
> can be done later.
>
> Paolo
hmm sorry here is the full patch,
Happy new year !
Cheers,
Gwen
package-version.patch
Description: Text Data
- Re: [Help-smalltalk] Version number in star packages,
Gwenael Casaccio <=