From 217aa1673450279c712d203e215ec3a9fa092b72 Mon Sep 17 00:00:00 2001 From: degenaro Date: Thu, 16 Nov 2023 08:48:39 -0500 Subject: [PATCH] fix: check for nothing to do when attempting release Signed-off-by: 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"