Skip to content

Commit

Permalink
chore: fix multi-line output
Browse files Browse the repository at this point in the history
  • Loading branch information
rjaegers committed Mar 5, 2024
1 parent ea03947 commit d841702
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ FILE=${1:?}
JSON=$(cat $FILE)
EXTENSIONS=
UPDATE_DETAILS=
declare -i NUMBER_OF_UPDATES=0

for EXTENSION in $(echo $JSON | jq -r '.[].customizations.vscode.extensions | flatten[]'); do
NAME="${EXTENSION%%@*}"
Expand All @@ -17,7 +16,6 @@ for EXTENSION in $(echo $JSON | jq -r '.[].customizations.vscode.extensions | fl

if [[ $CURRENT_VERSION != $LATEST_NON_PRERELEASE_VERSION ]];
then
NUMBER_OF_UPDATES+=1
UPDATE_DETAILS=$(printf "Updates \`%s\` from %s to %s\n\n%s" $NAME $CURRENT_VERSION $LATEST_NON_PRERELEASE_VERSION "$UPDATE_DETAILS")
fi

Expand All @@ -27,4 +25,4 @@ done
EXTENSIONS=$(echo "[${EXTENSIONS::-1}]" | jq 'sort_by(. | ascii_downcase)')
echo $JSON | jq '.[].customizations.vscode.extensions = $extensions' --argjson extensions "$EXTENSIONS" > $FILE

echo $UPDATE_DETAILS
echo "$UPDATE_DETAILS"

0 comments on commit d841702

Please sign in to comment.