mirror of
https://github.com/AppleCommander/AppleCommander.git
synced 2026-01-25 21:16:31 +00:00
37 lines
910 B
YAML
37 lines
910 B
YAML
# This is a crude license header check. The ones I tested were susceptible to whitespace differences
|
|
# and I never got them to work. My primary goal is to ensure the headers exist, so this suffices.
|
|
|
|
name: Verify AppleCommander has a license header
|
|
|
|
on:
|
|
push:
|
|
branches: [ "main" ]
|
|
tags:
|
|
- '*'
|
|
pull_request:
|
|
branches: [ "main" ]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
- name: Look for license phrase
|
|
run: |
|
|
outfile=$(mktemp)
|
|
find . -name "*.java" -not -name "Sleak.java" | xargs grep -L "GNU General Public License" > ${outfile}
|
|
if [ -s "${outfile}" ]
|
|
then
|
|
echo "License headers missing on the following files:"
|
|
cat ${outfile}
|
|
exit 1
|
|
else
|
|
echo "License headers appear to be valid!"
|
|
fi
|