From fc46f2ae7b82b4e11bca6b49c2689de296f704cf Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Fri, 2 Dec 2022 22:02:57 +0100 Subject: [PATCH] Update daily_README.yaml --- .github/workflows/daily_README.yaml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/daily_README.yaml b/.github/workflows/daily_README.yaml index b76612ba1..26604148d 100644 --- a/.github/workflows/daily_README.yaml +++ b/.github/workflows/daily_README.yaml @@ -106,19 +106,18 @@ jobs: if [[ $(jq '.arch[]' "$f/config.json") == *"armv7"* ]]; then sed -i "$ADDONSLINE"'a ![armv7][armv7-badge]' README2.md ARCH=armv7 && COUNT="$(curl -f -s -L https://github.com/alexbelgium/hassio-addons/pkgs/container/$SLUG-$ARCH/latest | awk '/Total downloads/{getline; print}' | awk -F '<|>' '{print $3}')" - if [ -z "$COUNT" ]; then COUNT="$(curl -f -s -L https://github.com/alexbelgium/hassio-addons/pkgs/container/$SLUG-$ARCH/latest | awk '/Total downloads/{getline; print}' | awk -F '<|>' '{print $2}')"; fi + if [ -z "$COUNT" ]; then echo "$(curl -f -s -L https://github.com/alexbelgium/hassio-addons/pkgs/container/$SLUG-$ARCH/latest | awk '/Total downloads/{getline; print}')"; fi echo "$COUNT $ARCH users with $SLUG" && DOWNLOADS="$(( DOWNLOADS + COUNT))" else sed -i "$ADDONSLINE"'a ![armv7no][armv7no-badge]' README2.md; fi || true if [[ $(jq '.arch[]' "$f/config.json") == *"amd64"* ]]; then sed -i "$ADDONSLINE"'a ![amd64][amd64-badge]' README2.md ARCH=amd64 && COUNT="$(curl -f -s -L https://github.com/alexbelgium/hassio-addons/pkgs/container/$SLUG-$ARCH/latest | awk '/Total downloads/{getline; print}' | awk -F '<|>' '{print $3}')" - if [ -z "$COUNT" ]; then COUNT="$(curl -f -s -L https://github.com/alexbelgium/hassio-addons/pkgs/container/$SLUG-$ARCH/latest | awk '/Total downloads/{getline; print}' | awk -F '<|>' '{print $2}')"; fi - echo "$COUNT $ARCH users with $SLUG" && DOWNLOADS="$(( DOWNLOADS + COUNT))" + if [ -z "$COUNT" ]; then echo "$(curl -f -s -L https://github.com/alexbelgium/hassio-addons/pkgs/container/$SLUG-$ARCH/latest | awk '/Total downloads/{getline; print}')"; fi echo "$COUNT $ARCH users with $SLUG" && DOWNLOADS="$(( DOWNLOADS + COUNT))" else sed -i "$ADDONSLINE"'a ![amd64no][amd64no-badge]' README2.md; fi || true if [[ $(jq '.arch[]' "$f/config.json") == *"aarch64"* ]]; then sed -i "$ADDONSLINE"'a ![aarch64][aarch64-badge]' README2.md ARCH=aarch64 && COUNT="$(curl -f -s -L https://github.com/alexbelgium/hassio-addons/pkgs/container/$SLUG-$ARCH/latest | awk '/Total downloads/{getline; print}' | awk -F '<|>' '{print $3}')" - if [ -z "$COUNT" ]; then COUNT="$(curl -f -s -L https://github.com/alexbelgium/hassio-addons/pkgs/container/$SLUG-$ARCH/latest | awk '/Total downloads/{getline; print}' | awk -F '<|>' '{print $2}')"; fi + if [ -z "$COUNT" ]; then echo "$(curl -f -s -L https://github.com/alexbelgium/hassio-addons/pkgs/container/$SLUG-$ARCH/latest | awk '/Total downloads/{getline; print}')"; fi echo "$COUNT $ARCH users with $SLUG" && DOWNLOADS="$(( DOWNLOADS + COUNT))" else sed -i "$ADDONSLINE"'a ![aarch64no][aarch64no-badge]' README2.md; fi || true if [[ -f "$f/updater.json" ]]; then sed -i "$ADDONSLINE"'a ![Update](https://img.shields.io/badge/dynamic/json?label=Updated&query=%24.last_update&url=https%3A%2F%2Fraw.githubusercontent.com%2Falexbelgium%2Fhassio-addons%2Fmaster%2F'"$FOLDERNAME"'%2Fupdater.json)' README2.md; fi