File tree 1 file changed +5
-2
lines changed
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -46,19 +46,22 @@ jobs:
46
46
# See: https://docs.github.com/en/free-pro-team@latest/github/creating-cloning-and-archiving-repositories/licensing-a-repository
47
47
- name : Check license file
48
48
run : |
49
+ EXIT_STATUS=0
49
50
# See: https://github.com/licensee/licensee
50
51
LICENSEE_OUTPUT="$(licensee detect --json --confidence=100)"
51
52
52
53
DETECTED_LICENSE_FILE="$(echo "$LICENSEE_OUTPUT" | jq .matched_files[0].filename | tr --delete '\r')"
53
54
echo "Detected license file: $DETECTED_LICENSE_FILE"
54
55
if [ "$DETECTED_LICENSE_FILE" != "\"${EXPECTED_LICENSE_FILENAME}\"" ]; then
55
56
echo "ERROR: detected license file doesn't match expected: $EXPECTED_LICENSE_FILENAME"
56
- exit 1
57
+ EXIT_STATUS= 1
57
58
fi
58
59
59
60
DETECTED_LICENSE_TYPE="$(echo "$LICENSEE_OUTPUT" | jq .matched_files[0].matched_license | tr --delete '\r')"
60
61
echo "Detected license type: $DETECTED_LICENSE_TYPE"
61
62
if [ "$DETECTED_LICENSE_TYPE" != "\"${EXPECTED_LICENSE_TYPE}\"" ]; then
62
63
echo "ERROR: detected license type doesn't match expected $EXPECTED_LICENSE_TYPE"
63
- exit 1
64
+ EXIT_STATUS= 1
64
65
fi
66
+
67
+ exit $EXIT_STATUS
You can’t perform that action at this time.
0 commit comments