From 04bddbb5b92508c67803c54480e6688be651b52d Mon Sep 17 00:00:00 2001 From: JAremko Date: Wed, 7 Jul 2021 15:01:41 +0300 Subject: [PATCH] [ci] cleanup --- .circleci/make_patch | 6 ++++++ .circleci/org/update_docs | 7 ++++++- .circleci/shared | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.circleci/make_patch b/.circleci/make_patch index b901bf28d..d2cbf4623 100755 --- a/.circleci/make_patch +++ b/.circleci/make_patch @@ -10,6 +10,8 @@ ## ## License: GPLv3 +git add --all + if [[ -z "$(git status --porcelain)" ]]; then git diff HEAD > "/tmp/${PUBLISH}.patch" echo "Changed files:" @@ -18,6 +20,10 @@ if [[ -z "$(git status --porcelain)" ]]; then echo "Patch:" cat "/tmp/${PUBLISH}.patch" echo "============================" + if [[ -z $(grep '[^[:space:]]' "/tmp/${PUBLISH}.patch") ]]; then + echo "\"/tmp/${PUBLISH}.patch\" is empty while the repo has changes." + exit 0 + fi else echo "No changes. Exiting." exit 0 diff --git a/.circleci/org/update_docs b/.circleci/org/update_docs index 4fde6c10b..9bdbb59ed 100755 --- a/.circleci/org/update_docs +++ b/.circleci/org/update_docs @@ -10,7 +10,7 @@ ## ## License: GPLv3 -echo_headline "Generating new layers indext file data" +echo_headline "Generating new layers index file" spacedoc layers \ -c".ci/spacedoc-cfg.edn" \ /tmp/sdn/layers @@ -19,6 +19,11 @@ if [ $? -ne 0 ]; then exit 2 fi +if [ ! -f /tmp/sdn/layers/LAYERS.sdn ]; then + echo " /tmp/sdn/layers/LAYERS.sdn doesn't exist" + exit 2 +fi + echo_headline "Generating new .org files from .sdn representation" spacedoc orgify \ -c".ci/spacedoc-cfg.edn" \ diff --git a/.circleci/shared b/.circleci/shared index 0013b6578..626ec0966 100755 --- a/.circleci/shared +++ b/.circleci/shared @@ -47,7 +47,7 @@ exit_if_no_changes () { exit 0 fi if [[ -z $(grep '[^[:space:]]' "/tmp/${PUBLISH}.patch") ]]; then - echo "\"/tmp/${PUBLISH}.patch\" patch file is empty. Exiting." + echo "\"/tmp/${PUBLISH}.patch\" file is empty. Exiting." exit 0 fi }