Skip to content

Commit

Permalink
fix: handle nothing to do
Browse files Browse the repository at this point in the history
Signed-off-by: Lou DeGenaro <[email protected]>
  • Loading branch information
degenaro committed Nov 16, 2023
1 parent 104da24 commit 9819942
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions scripts/automation/push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 "push: no catalog or markdown, nothing to do"
exit 0
fi

function github-branch-commit() {
msg "Github ref $GITHUB_REF"
GIT_BRANCH=${GITHUB_REF##*/}
Expand Down
2 changes: 1 addition & 1 deletion scripts/automation/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ 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"
echo "release: no catalog or markdown, nothing to do"
exit 0
fi

Expand Down

0 comments on commit 9819942

Please sign in to comment.