diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6ed2ef25..71218478 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,8 +1,5 @@ .after_script: - script: ./compile_finish.sh "$CI_JOB_STATUS" - rules: - - if: '$CI_JOB_STATUS == "failed"' - - when: never + script: ./compile_check.sh "$CI_JOB_STATUS" artifacts: paths: - release/*.svg diff --git a/compile_check.sh b/compile_check.sh new file mode 100644 index 00000000..2bdfd51a --- /dev/null +++ b/compile_check.sh @@ -0,0 +1,12 @@ +#/bin/sh +echo " " +echo "=======================" +echo " " +if [ "$1" = "failed" ] +then + echo "Errors Occurred, please review." + wget -q https://img.shields.io/badge/build-failed-red.svg -O release/build.svg 2>/dev/null + echo " " + echo "=======================" + exit 1 +fi \ No newline at end of file