mirror of https://gitlab.com/curben/blog
ci: ensure microblog/ is not empty
This commit is contained in:
parent
55ebe2520d
commit
8042d4195a
|
@ -37,7 +37,7 @@ test:
|
||||||
- sh check-homepage.sh
|
- sh check-homepage.sh
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
- if: '$RENOVATE != "true" && $CI_COMMIT_REF_NAME == "master" && ($CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "web")'
|
- if: '$RENOVATE != "true" && $CI_COMMIT_REF_NAME == "microblog" && ($CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "web")'
|
||||||
when: always
|
when: always
|
||||||
|
|
||||||
artifacts:
|
artifacts:
|
||||||
|
|
|
@ -5,12 +5,12 @@
|
||||||
HOMEPAGE="public/microblog/index.html"
|
HOMEPAGE="public/microblog/index.html"
|
||||||
|
|
||||||
if [ ! -f "$HOMEPAGE" ]; then
|
if [ ! -f "$HOMEPAGE" ]; then
|
||||||
echo "Error: homepage doesn't exist"
|
echo "Error: microblog doesn't exist"
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
FILE_SIZE=$(ls -s "$HOMEPAGE" | cut -d" " -f1)
|
FILE_SIZE=$(ls -s "$HOMEPAGE" | cut -d" " -f1)
|
||||||
if [ "$FILE_SIZE" = 0 ]; then
|
if [ "$FILE_SIZE" = 0 ]; then
|
||||||
echo "Error: homepage is empty"
|
echo "Error: microblog is empty"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue