Skip to content

Commit

Permalink
Fix antora sed script to allow tags with single entry to work. (#3117)
Browse files Browse the repository at this point in the history
This changeset makes sure that tags in the form of [a.b.c] are
properly recognized. Previously they would only work if either no
or at least two elements are in the tags list.
  • Loading branch information
daschl authored Dec 5, 2024
1 parent 74dc8c1 commit 8f72e01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/manage-antora-remote-versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ cat "$file" | while IFS='' read line; do
if ( echo "$line" | grep -q "[[ ]${majorminor}.\d" ); then
# If major.minor was already in this line, update the patch version
echo "$line" |
sed "s/^ tags: \[\(.*[[ ]\)$majorminor\.[^,]*\(.*\)\]$/ tags: [\1$newversion\2]/" \
sed "s/^ tags: \[\(.*[[ ]\)*$majorminor\.[^,]*\(.*\)\]$/ tags: [\1$newversion\2]/" \
>> "$file.tmp"
elif ( echo "$line" | grep -q "^ tags: \[[ ]*\]$" ); then
# If tags is empty
Expand Down

0 comments on commit 8f72e01

Please sign in to comment.