Skip to content

Commit

Permalink
Change dependency entries for replace lines to list the version first…
Browse files Browse the repository at this point in the history
…, then the replaced library.
  • Loading branch information
SpicyLemon committed Aug 1, 2024
1 parent b3214cb commit 64d16f1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions scripts/get-dep-changes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,10 @@ get_replace_str () {
if [[ -n "$repl" ]]; then
if [[ "$repl" =~ ' ' ]]; then
# $repl has the format "<other library> <other version>"
# It's provided without quotes so that it gets split on that space and provided
# to this printf as two separate args to put tics around the <other library>.
printf '`%s` %s' $repl
# We'll want it as "<other version> of `<other library>`".
# It's provided without quotes to printf so that it gets split on that
# space and provided as two separate args to put tics around the <other library>.
printf '%s of `%s`' $( sed -E 's/^([^ ]+) +(.*)$/\2 \1/' <<< "$repl" )
else
# $repl is a <location>, put tics around it.
printf '`%s`' "$repl"
Expand Down

0 comments on commit 64d16f1

Please sign in to comment.