Skip to content

Commit

Permalink
ci: add separate license check (aws#4727)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmayclin authored Aug 23, 2024
1 parent 115fbd9 commit 064723f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci_linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Check
run: ./codebuild/bin/run_cppcheck.sh "$CPPCHECK_INSTALL_DIR"

copyright:
headers:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -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/header_mistake_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 064723f

Please sign in to comment.