Simplify parsing of json using jq built-in features

Saves spawning multiple sed processes.
This commit is contained in:
Felix Eckhofer
2023-01-07 19:47:16 +01:00
committed by Trenton H
parent 3daee46c3d
commit 4def3bf5c2
2 changed files with 8 additions and 8 deletions

View File

@@ -95,8 +95,8 @@ jobs:
name: Setup other versions
id: cache-bust-setup
run: |
pillow_version=$(jq ".default.pillow.version" Pipfile.lock | sed 's/=//g' | sed 's/"//g')
lxml_version=$(jq ".default.lxml.version" Pipfile.lock | sed 's/=//g' | sed 's/"//g')
pillow_version=$(jq -r '.default.pillow.version | gsub("=";"")' Pipfile.lock)
lxml_version=$(jq -r '.default.lxml.version | gsub("=";"")' Pipfile.lock)
echo "Pillow is ${pillow_version}"
echo "lxml is ${lxml_version}"