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.
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