]> git.kaiwu.me - haproxy.git/commitdiff
SCRIPTS: create-release: do not match the word "version" isolated
authorWilly Tarreau <w@1wt.eu>
Thu, 12 Nov 2026 15:47:56 +0000 (16:47 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 12 Nov 2026 17:12:23 +0000 (18:12 +0100)
It happens that some parts of security.txt were ruined, where anything
following the word "version" till the end of a line was replaced with
the current branch. Let's make sure we only match version chars after
it.

This can be backported.

scripts/create-release

index 8d050b695939c3a9572446692f845df92546060e..1ae42765e2beef79dd1873d160df642643043d00 100755 (executable)
@@ -185,7 +185,7 @@ echo "$DATE" >> VERDATE
 for file in doc/intro.txt doc/configuration.txt doc/management.txt $(git diff --name-only v${OLD}.. -- doc); do
        if [ ! -e "$file" ]; then continue; fi
        echo "Updating $file ..."
-       sed -e "1,10s:\(\sversion\s\).*:\1$BRANCH:" \
+       sed -e "1,10s:\(\sversion\s*\)[0-9][0-9.]\+\(\|-dev[0-9]*\):\1$BRANCH:" \
            -e "1,10s:\(\s\)\(20[0-9]\{2\}/[0-9]\{1,2\}/[0-9]\{1,2\}\):\1$DATE:" \
            -i "$file"
 done