Skip to content

Commit

Permalink
fixing bash script
Browse files Browse the repository at this point in the history
  • Loading branch information
edulix committed Nov 22, 2021
1 parent 3ad036d commit fca47e3
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,27 +104,27 @@ runs:
[ "${FAIL_ON}" = "errors" ] && { \
echo " Checking unresolved errors"; \
echo "-----------------------------------------------------------------"; \
grep "Rule Violation Summary (0 errors" $A/ort/scan-report.html >/dev/null; \
grep "Rule Violation Summary (0 errors" ${{ github.workspace }}/ort/scan-report.html >/dev/null; \
export FAILED_EXEC=$?; \
if [ $FAILED_EXEC -eq 0 ]; \
then \
echo "0 unresolved errors"; \
else; \
else \
echo "FAIL: report has unresolved errors"; \
exit 1; \
fi; \
} || echo "Do not fail on report unresolved errors";
} || echo "Do not fail on report unresolved errors";
echo "-----------------------------------------------------------------";
[ "${FAIL_ON}" = "warnings" ] && { \
echo " Checking unresolved errors/warnings"; \
echo "-----------------------------------------------------------------"; \
grep "Rule Violation Summary (0 errors, 0 warnings" $A/ort/scan-report.html >/dev/null; \
grep "Rule Violation Summary (0 errors, 0 warnings" ${{ github.workspace }}/ort/scan-report.html >/dev/null; \
export FAILED_EXEC=$?; \
if [ $FAILED_EXEC -eq 0 ]; \
then \
echo "0 unresolved errors/warnings"; \
else; \
else \
echo "FAIL: report has unresolved errors/warnings"; \
exit 1; \
fi; \
Expand All @@ -134,18 +134,16 @@ runs:
[ "${FAIL_ON}" = "hints" ] && { \
echo " Checking unresolved errors/warnings/hints"; \
echo "-----------------------------------------------------------------"; \
grep "Rule Violation Summary (0 errors, 0 warnings, 0 hints to resolve)" $A/ort/scan-report.html >/dev/null; \
export FAILED_EXEC=$?; \
if [ $FAILED_EXEC -eq 0 ]; \
grep "Rule Violation Summary (0 errors, 0 warnings, 0 hints to resolve)" ${{ github.workspace }}/ort/scan-report.html >/dev/null; \
if [ $? -eq 0 ]; \
then \
echo "0 unresolved errors/warnings/hints"; \
else; \
else \
echo "FAIL: report has unresolved errors/warnings/hints"; \
exit 1; \
fi; \
} || echo "Do not fail on report unresolved errors/warnings/hints";
echo "-----------------------------------------------------------------";
- name: Create output results directory and ORT_DATA_DIR=/project/.ort/
id: results-dir
Expand Down

0 comments on commit fca47e3

Please sign in to comment.