What about simply adding a `q` command after the first replacement so only that one is handled?

Le 15 octobre 2023 10:05:04 GMT+02:00, "Enrico Tröger" ***@***.***> a écrit :
>@eht16 commented on this pull request.
>
>
>
>> @@ -23,6 +23,7 @@ s/^\(#define VER_FILEVERSION_STR *\)[^ ].*$/\1"'"$VER"'"/
> ' -i geany_private.rc
>
> sed -e 's/^\(AC_INIT([^,]*, *\[\)[^]]*\(\],\)/\1'"$VER"'\2/' -i configure.ac
>+sed -e 's/^\( *version: *\)[^,]*\(,\)/\1'"\'$VER\'"'\2/' -i meson.build
>
>True. I tried two things already but failed:
>- include the single quotes in the groups in the regex but failed badly on the proper quoting for shell and sed of single quotes within a single quoted string :(
>- tried to define the Geany version as variable in `meson.build` but Meson has a strict policy that the `project()` must be the very the first instruction in the file. Newer versions of Meson can read the version within the `project()` call from a command which would give more flexibility but we require an older version which does not support this.
>
>Anyway, I also think this is OK for now. It is "just" the version-bump script which we use only manually and will notice when the regex fails at some later point and can adjust it when needed.
>
>--
>Reply to this email directly or view it on GitHub:
>https://github.com/geany/geany/pull/3599#discussion_r1359807460
>You are receiving this because you are subscribed to this thread.
>
>Message ID: ***@***.***>


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <geany/geany/pull/3599/c1763316897@github.com>