CI: Use jq to process package.json

[why]
`grep` and `awk` do not know json. This might break if some format
changes or whatever.

[note]
The font matrix setup is also with `jq`.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
This commit is contained in:
Fini Jastrow 2022-08-26 07:33:56 +02:00
parent e972eb0785
commit a777d53008

View file

@ -48,11 +48,7 @@ jobs:
cd -- "$GITHUB_WORKSPACE"
echo "Contents of package.json:"
cat package.json
RELEASE_VERSION=$(cat package.json \
| grep version \
| head -1 \
| awk -F: '{ print $2 }' \
| sed 's/[ ",]//g')
RELEASE_VERSION=$(jq '.version' package.json | sed 's/[ ",]//g')
echo "::set-output name=val::$RELEASE_VERSION"
- name: Determine candidate status