Skip to content

Commit 767cb3a

Browse files
committed
build: ensure year extraction works across different operating systems
1 parent c442b93 commit 767cb3a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

.github/workflows/lint_copyright_years.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,7 @@ jobs:
9696
fi
9797
9898
# Check if file contains stdlib copyright notice:
99-
year=$(grep -oP \
100-
'Copyright \(c\) \K[0-9]{4}(?= The Stdlib Authors\.)' \
101-
"$file")
99+
year=$(grep -o 'Copyright (c) [0-9]\{4\} The Stdlib Authors\.' "$file" | sed -E 's/^Copyright \(c\) ([0-9]{4}) The Stdlib Authors\./\1/' || true)
102100
103101
if [[ -n "$year" ]]; then
104102
if [[ "$year" == "$current_year" ]]; then

0 commit comments

Comments
 (0)