File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919 files=$(find . -type f \( -name "*.sh" -o -name "*.go" -o -name "*.swift" -o -name "*.py" -o -name "README.md" \) -not -path '*/.*')
2020
2121 for file in $files; do
22+ if [ "$file" = "./README.md" ]; then
23+ continue
24+ fi
25+
2226 missing_reqs=0
2327
2428 # Requirement 1: A line with both "Copyright" and "Jamf"
@@ -28,16 +32,21 @@ jobs:
2832 missing_reqs=1
2933 fi
3034
31- # Requirement 2: Specific license string
32- if ! grep -Fq "This work is licensed under the terms of the Jamf Source Available License" "$file"; then
33- echo "::error file=$file::Missing 'This work is licensed under the terms of the Jamf Source Available License'"
34- missing_reqs=1
35- fi
36-
37- # Requirement 3: License URL
38- if ! grep -Fq "https://github.com/jamf/scripts/blob/main/LICENCE.md" "$file"; then
39- echo "::error file=$file::Missing 'https://github.com/jamf/scripts/blob/main/LICENCE.md'"
40- missing_reqs=1
35+ filename=$(basename "${file}")
36+ if [ "${filename}" = "README.md" ]; then
37+ echo "skipping license check for: ${file}"
38+ else
39+ # Requirement 2: Specific license string
40+ if ! grep -Fq "This work is licensed under the terms of the Jamf Source Available License" "$file"; then
41+ echo "::error file=$file::Missing 'This work is licensed under the terms of the Jamf Source Available License'"
42+ missing_reqs=1
43+ fi
44+
45+ # Requirement 3: License URL
46+ if ! grep -Fq "https://github.com/jamf/scripts/blob/main/LICENCE.md" "$file"; then
47+ echo "::error file=$file::Missing 'https://github.com/jamf/scripts/blob/main/LICENCE.md'"
48+ missing_reqs=1
49+ fi
4150 fi
4251
4352 if [ $missing_reqs -eq 1 ]; then
You can’t perform that action at this time.
0 commit comments