[ci] cleanup

This commit is contained in:
JAremko 2021-07-07 15:01:41 +03:00 committed by Eugene Yaremenko
parent daf108cb1b
commit 04bddbb5b9
3 changed files with 13 additions and 2 deletions

View File

@ -10,6 +10,8 @@
## ##
## License: GPLv3 ## License: GPLv3
git add --all
if [[ -z "$(git status --porcelain)" ]]; then if [[ -z "$(git status --porcelain)" ]]; then
git diff HEAD > "/tmp/${PUBLISH}.patch" git diff HEAD > "/tmp/${PUBLISH}.patch"
echo "Changed files:" echo "Changed files:"
@ -18,6 +20,10 @@ if [[ -z "$(git status --porcelain)" ]]; then
echo "Patch:" echo "Patch:"
cat "/tmp/${PUBLISH}.patch" cat "/tmp/${PUBLISH}.patch"
echo "============================" echo "============================"
if [[ -z $(grep '[^[:space:]]' "/tmp/${PUBLISH}.patch") ]]; then
echo "\"/tmp/${PUBLISH}.patch\" is empty while the repo has changes."
exit 0
fi
else else
echo "No changes. Exiting." echo "No changes. Exiting."
exit 0 exit 0

View File

@ -10,7 +10,7 @@
## ##
## License: GPLv3 ## License: GPLv3
echo_headline "Generating new layers indext file data" echo_headline "Generating new layers index file"
spacedoc layers \ spacedoc layers \
-c".ci/spacedoc-cfg.edn" \ -c".ci/spacedoc-cfg.edn" \
/tmp/sdn/layers /tmp/sdn/layers
@ -19,6 +19,11 @@ if [ $? -ne 0 ]; then
exit 2 exit 2
fi 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" echo_headline "Generating new .org files from .sdn representation"
spacedoc orgify \ spacedoc orgify \
-c".ci/spacedoc-cfg.edn" \ -c".ci/spacedoc-cfg.edn" \

View File

@ -47,7 +47,7 @@ exit_if_no_changes () {
exit 0 exit 0
fi fi
if [[ -z $(grep '[^[:space:]]' "/tmp/${PUBLISH}.patch") ]]; then 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 exit 0
fi fi
} }