Re: Add meson.build to version_stamp.pl - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Add meson.build to version_stamp.pl
Date
Msg-id 20221005182050.5ygpvquvjj77xug6@awork3.anarazel.de
Whole thread Raw
In response to Re: Add meson.build to version_stamp.pl  (Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>)
Responses Re: Add meson.build to version_stamp.pl  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
Hi,

On 2022-10-05 11:36:36 +0100, Dagfinn Ilmari Mannsåker wrote:
> Peter Eisentraut <peter.eisentraut@enterprisedb.com> writes:
> 
> > Thinking ahead a bit, we need to add meson.build to version_stamp.pl.

Good idea.  I was wondering for a moment whether we should put the version
into some file instead, and reference that from meson.build - but the
convenient way to do that is only in 0.56, which we currently don't want to
require...  We could work around it, but it doesn't seem necessary for now.


> > Maybe someone can think of a better sed expression, but this one seems
> > good enough to me for now.
> […]
> > +sed_file("meson.build",
> > +    qq{-e "1,20s/ version: '[0-9a-z.]*',/ version: '$fullversion',/"}
> > +);
> 
> I think it would be better to not rely on the line numbers, but instead
> limit it to the project() stanza, something like this:

> sed_file("meson.build",
>     qq{-e "/^project(/,/^)/ s/ version: '[0-9a-z.]*',/ version: '$fullversion',/"}
> );

Yea, that looks nicer.

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Nathan Bossart
Date:
Subject: Re: Suppressing useless wakeups in walreceiver
Next
From: Nathan Bossart
Date:
Subject: Re: archive modules