Skip to content

Commit

Permalink
ci: add separate license check
Browse files Browse the repository at this point in the history
  • Loading branch information
jmayclin committed Aug 22, 2024
1 parent 0251781 commit 1aad748
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/ci_linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
run: source ./codebuild/bin/s2n_setup_env.sh

- name: Check
run: ./codebuild/bin/copyright_mistake_scanner.sh
run: ./codebuild/bin/file_header_scanner.sh

simple-mistakes:
runs-on: ubuntu-latest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,16 @@ for file in $S2N_FILES; do
fi
done

for file in $S2N_FILES; do
# The Apache 2.0 License should appear in every file
COUNT=`head -5 $file | grep -E "Apache License, Version 2.0|Apache-2.0" | wc -l`;
if [ "$COUNT" == "0" ];
then
FAILED=1;
echo "License Check Failed: $file";
fi
done

if [ $FAILED == 1 ];
then
printf "\\033[31;1mFAILED Copyright Check\\033[0m\\n"
Expand Down

0 comments on commit 1aad748

Please sign in to comment.