Commit 5e4e5dd7 authored by Jan Kiene's avatar Jan Kiene
Browse files

return value based on content of diff file

parent dbb9e0f3
Loading
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -67,11 +67,13 @@ format:
  script:
    - mkdir $ARTIFACT_FOLDER

    - isort --profile black . || ret_val_isort=$?
    - black . || ret_val_black=$?
    - git diff > "${ARTIFACT_FOLDER}/${ARTIFACT_BASE_NAME}.patch"
    - isort --profile black .
    - black .

    - if [[ $ret_val_isort != 0 || $ret_val_black != 0 ]]; then exit 1; fi
    - patch_file="${ARTIFACT_FOLDER}/${ARTIFACT_BASE_NAME}.patch"
    - git diff > $patch_file

    - if [ -s $patch_file ]; then exit 1; fi
  artifacts:
    paths:
      - "$ARTIFACT_FOLDER"