use jq instead of awk

This commit is contained in:
aptalca 2023-05-20 14:13:23 -04:00
parent e4d9875278
commit 184d8619ae
No known key found for this signature in database
GPG Key ID: BE36CFFB9FD85548
2 changed files with 2 additions and 2 deletions

View File

@ -20,7 +20,7 @@ jobs:
echo "BASEIMAGE=${{ env.BASEIMAGE }}" >> $GITHUB_OUTPUT
echo "MODNAME=${{ env.MODNAME }}" >> $GITHUB_OUTPUT
# **** If the mod needs to be versioned, set the versioning logic below. Otherwise leave as is. ****
MOD_VERSION=$(curl -sX GET "https://api.github.com/repos/kovidgoyal/calibre/releases/latest" | awk '/tag_name/{print $4;exit}' FS='[""]')
MOD_VERSION=$(curl -sX GET "https://api.github.com/repos/kovidgoyal/calibre/releases/latest" | jq -r '.tag_name')
echo "MOD_VERSION=${MOD_VERSION}" >> $GITHUB_OUTPUT
outputs:
GITHUB_REPO: ${{ steps.outputs.outputs.GITHUB_REPO }}

View File

@ -10,7 +10,7 @@ RUN \
/root-layer && \
if [[ -z "${MOD_VERSION}" ]]; then \
MOD_VERSION=$(curl -sX GET "https://api.github.com/repos/kovidgoyal/calibre/releases/latest" \
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
| jq -r '.tag_name'); \
fi && \
echo $MOD_VERSION > /root-layer/CALIBRE_RELEASE