-if [ $commits_behind_count -eq 0 ]; then exit 0; else echo "Your branch is behind main, possibly main changed during your pipeline run, run 'git merge origin/main' to update." exit 1; fi;
# for merges to basop-ci-branch, run the long test suite in reference generation mode to catch problems already here and not only in the BASOP repo
-if [ $exit_code -eq 1 ] && [ $zero_errors == 1 ]; then echo "pytest run had failures, but no errors and non-BE flag present"; exit $EXIT_CODE_NON_BE; fi
-if [ $exit_code -ne 0 ] && [ $zero_errors == 1 ]; then echo "pytest run had failures, but no errors and non-BE flag present"; exit $EXIT_CODE_NON_BE; fi
-if [ $exit_code -ne 0 ]; then echo "pytest run had errors"; exit $EXIT_CODE_FAIL; fi;
-unzip artifacts.zip || true# this may fail on first run, when there are no artifacts there and the zip file is actually just "404"-html
-ls
-public_dir="$CI_JOB_NAME-public"
# if is needed to catch case when no artifact is there (first run), similarly as above
-if [[ -d $public_dir ]]; then mv $public_dir/* wmops/; fi
# 1. check for public_dir being there as this might not be the case when artifact download failed
# 2. check for public dir not being empty - handle job failures in prev job that happen after the dir is created. In that case, the empty dir is in the artifacts
-if [ -d $public_dir ] && [ ! -z "$( ls -A $public_dir )" ]; then
-mv $public_dir/* wmops/
# check here if we have the split-by-levels files present - if not, fake them up with the existing global one
# this is needed for the first run with split graphs on a branch where the global version did run previously
# NOTE: checking only for level_1 file here as this should already be sufficient
# NOTE2: also not chechking for RAM for same reason