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"