diff --git a/scripts/automation/push.sh b/scripts/automation/push.sh
index 6c68c6c..5e25126 100755
--- a/scripts/automation/push.sh
+++ b/scripts/automation/push.sh
@@ -86,8 +86,8 @@ function err() {
     msg "$*" 1>&2
 }
 
-COUNT_COMPONENT_DEFINITIONS=$(ls -l component-definitions | grep ^- | wc -l)
-COUNT_COMPONENT_DEFINITIONS_MD=$(ls -l md_components | grep ^- | wc -l)
+COUNT_COMPONENT_DEFINITIONS=$(ls -1 component-definitions | wc -l)
+COUNT_COMPONENT_DEFINITIONS_MD=$(ls -1 md_components | wc -l)
 if [ "$COUNT_COMPONENT_DEFINITIONS" == "0" ] || [ "$COUNT_COMPONENT_DEFINITIONS_MD" == "0" ]
 then
     echo "no component-definition or markdown present -> nothing to do"
diff --git a/scripts/automation/release.sh b/scripts/automation/release.sh
index bd716d3..0c64e43 100755
--- a/scripts/automation/release.sh
+++ b/scripts/automation/release.sh
@@ -2,8 +2,8 @@
 
 source config.env
 
-COUNT_COMPONENT_DEFINITIONS=$(ls -l component-definitions | grep ^- | wc -l)
-COUNT_COMPONENT_DEFINITIONS_MD=$(ls -l md_components | grep ^- | wc -l)
+COUNT_COMPONENT_DEFINITIONS=$(ls -1 component-definitions | wc -l)
+COUNT_COMPONENT_DEFINITIONS_MD=$(ls -1 md_components | wc -l)
 if [ "$COUNT_COMPONENT_DEFINITIONS" == "0" ] || [ "$COUNT_COMPONENT_DEFINITIONS_MD" == "0" ]
 then
     echo "no component-definition or markdown present -> nothing to do"
@@ -12,7 +12,7 @@ else
 	echo "Bumping version of component-definitions to ${version_tag}" 
 	export VERSION_TAG="$version_tag"
 	echo "VERSION_TAG=${VERSION_TAG}" >> $GITHUB_ENV
-	COUNT=$(ls -l md_components | grep ^- | wc -l)
+	COUNT=$(ls -1 md_components | wc -l)
 	if [ $COUNT -lt 1 ]
 	then
 		./scripts/automation/regenerate_components.sh