From 104da24b423fbdbff92b341d71216d6d9ae518eb Mon Sep 17 00:00:00 2001 From: Lou DeGenaro Date: Thu, 16 Nov 2023 14:40:27 -0500 Subject: [PATCH] fix: handle content not initialized Signed-off-by: Lou DeGenaro --- scripts/automation/release.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/automation/release.sh b/scripts/automation/release.sh index 8debf56..a1c528e 100755 --- a/scripts/automation/release.sh +++ b/scripts/automation/release.sh @@ -2,6 +2,16 @@ source config.env +# If there is no catalog or markdown, then there is nothing to do +COUNT_CATALOG_MD=$(ls -l md_catalogs | grep ^- | wc -l) +COUNT_CATALOGS=$(ls -l catalogs | grep ^- | wc -l) +let "INITIALIZED = $COUNT_CATALOG_MD + $COUNT_CATALOGS" +if [ $INITIALIZED -eq 0 ] +then + echo "no catalog or markdown, nothing to do" + exit 0 +fi + version_tag=$(semantic-release print-version) echo "Bumping version of catalogs to ${version_tag}" export VERSION_TAG="$version_tag"