Skip to content

Commit

Permalink
Fix copyright script
Browse files Browse the repository at this point in the history
  • Loading branch information
rprospero committed Jun 18, 2024
1 parent 0ac3aa1 commit f45cfdf
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions .github/workflows/qc/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,13 @@ runs:
git diff
git diff --quiet
- name: Copyright Year
shell: bash
run: |
set -ex
# Find all occurances of "YYYY Team QuickPlot and contributors" and replace YYYY with the current year
find . -type f -not -path '.git/*' -exec sed -i "s/[0-9]{4} \(Team QuickPlot and contributors\)/$(date +%Y) \1/g" {} +
# Show the diff to give an indication of the issues in the CI log
git diff
- name: Copyright Year
shell: bash
run: |
set -ex
# Run quiet diff to fail the job if any changes were made (see man git-diff)
git diff --quiet
for i in $(find src tests -type f -name "*.h" -o -name "*.cpp" -o -name "*.qml");
do
echo $i
head -n 2 $i | diff .github/workflows/qc/copyright.txt "-"
done

0 comments on commit f45cfdf

Please sign in to comment.