Peter Eisentraut <peter.eisentr...@enterprisedb.com> writes:

> Thinking ahead a bit, we need to add meson.build to version_stamp.pl.
>
> 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',/"}
);

- ilmari


Reply via email to