diff --git a/scripts/automation/push.sh b/scripts/automation/push.sh index b67b43f..f6f023b 100755 --- a/scripts/automation/push.sh +++ b/scripts/automation/push.sh @@ -86,8 +86,8 @@ function err() { msg "$*" 1>&2 } -COUNT_CATALOGS=$(ls -l catalogs | grep ^- | wc -l) -COUNT_CATALOG_MD=$(ls -l md_catalogs | grep ^- | wc -l) +COUNT_CATALOGS=$(ls -1 catalogs | wc -l) +COUNT_CATALOG_MD=$(ls -1 md_catalogs | wc -l) if [ "$COUNT_CATALOGS" == "0" ] || [ "$COUNT_CATALOG_MD" == "0" ] then echo "no catalog or markdown present -> nothing to do" diff --git a/scripts/automation/release.sh b/scripts/automation/release.sh index 543580f..414b49c 100755 --- a/scripts/automation/release.sh +++ b/scripts/automation/release.sh @@ -2,8 +2,8 @@ source config.env -COUNT_CATALOGS=$(ls -l catalogs | grep ^- | wc -l) -COUNT_CATALOG_MD=$(ls -l md_catalogs | grep ^- | wc -l) +COUNT_CATALOGS=$(ls -1 catalogs | wc -l) +COUNT_CATALOG_MD=$(ls -1 md_catalogs | wc -l) if [ "$COUNT_CATALOGS" == "0" ] || [ "$COUNT_CATALOG_MD" == "0" ] then echo "no catalog or markdown present -> nothing to do" @@ -13,7 +13,7 @@ else export VERSION_TAG="$version_tag" echo "VERSION_TAG=${VERSION_TAG}" >> $GITHUB_ENV # There is no md but json has at least one control - COUNT=$(ls -l md_catalogs | grep ^- | wc -l) + COUNT=$(ls -1 md_catalogs | wc -l) if [ $COUNT -lt 1 ] then ./scripts/automation/regenerate_catalogs.sh