[PATCH 1/2] Simplify vesion extraction and correct some bugglet.

Cristian Ionescu-Idbohrn cristian.ionescu-idbohrn at axis.com
Sat Feb 16 10:06:22 PST 2013


On Sat, 16 Feb 2013, Henrik Brautaset Aronsen wrote:
> Cristian Ionescu-Idbohrn wrote:
> > AFAIU, what you want is to edit a string like 'v2.1-636-gc12ef0ce3eef'
> > and strip off both the 'v' prefix and 'everything after the first dash'
> > suffix, then add some zeroes. The sed regexps don't do that got me. And
> > they are overly convoluted.  I get:
> >
> > 	PRODVERSION_STRING=2.1.636.0
> > 	CFBUNDLEVERSION_STRING=2.1.636
> >
> > This patch simplifies that and reuses code. Result:
> >
> > 	VERSION_STRING='v2.1-637-gd0b2b6a515b8'
> > 	CFBUNDLEVERSION_STRING='2.1.0'
> > 	PRODVERSION_STRING='2.1.0.0'
>
> No, I think the "2.1.636.0" and "2.1.636" is used to identify
> *development* versions.  Prod versions (where HEAD is on a tag) will
> have "2.1.0.0" and "2.1.0".

Hmm...  I was almost certain I was missing something, but hey, the
documentations didn't help me much :(

	# Mac Info.plist style with three numbers 1.2.3

Alright, so in a scenario like:

	VERSION_STRING='v2.1-637-gd0b2b6a515b8'

we want:

	CFBUNDLEVERSION_STRING='2.1.636'

but if:

	VERSION_STRING='v2.1'

then:

	CFBUNDLEVERSION_STRING='2.1.0'

Back to the drawing board then ;)


Cheers,

-- 
Cristian


More information about the subsurface mailing list