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

Dirk Hohndel dirk at hohndel.org
Sat Feb 16 12:56:33 PST 2013


Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn at axis.com> writes:

> On Sat, 16 Feb 2013, Dirk Hohndel wrote:
>> On February 16, 2013 8:30:09 AM Cristian Ionescu-Idbohrn
>> <cristian.ionescu-idbohrn at axis.com> 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
>>
>> Actually, that is exactly what I want. These two are mostly for me for
>> building the windows and Mac installers. Windows wants four digits, Mac three.
>> And I use the third digit to indicate the number of commits since the last
>> tag. This way you can see that this is not a "release".
>
> Alright.  And the 4:th digit (where required) is always a '0'?

Since that's only used by the Windows build I generally have it as
0. When I had to redo binaries for a specific version (because something
went wrong in the creation of the package, not a code change) I have
manually incremented that in the past (so I could tell that a user had
the updated version).

But the automatic tools should always leave that one as 0

/D


More information about the subsurface mailing list