Skip to content

Commit bb6150e

Browse files
committed
Use correct Kotlin file extension in update_copyright_headers.sh
1 parent 38a4f23 commit bb6150e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

update_copyright_headers.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ current_year=$(date +'%Y')
1111
echo Updating copyright headers in Java, Kotlin, and Groovy source code for year $current_year
1212

1313
# Added/Modified this year and committed
14-
for file in $(git --no-pager diff --name-only --diff-filter=AM @{$current_year-01-01}..@{$current_year-12-31} | egrep "^.+\.(java|kotlin|groovy)$" | uniq); do
14+
for file in $(git --no-pager diff --name-only --diff-filter=AM @{$current_year-01-01}..@{$current_year-12-31} | egrep "^.+\.(java|kt|groovy)$" | uniq); do
1515
sed -i '' -E "s/Copyright 2002-[0-9]{4}/Copyright 2002-$current_year/g" $file;
1616
done
1717

1818
# Added/Modified and staged but not yet committed
19-
for file in $(git --no-pager diff --name-only --diff-filter=AM --cached | egrep "^.+\.(java|kotlin|groovy)$" | uniq); do
19+
for file in $(git --no-pager diff --name-only --diff-filter=AM --cached | egrep "^.+\.(java|kt|groovy)$" | uniq); do
2020
sed -i '' -E "s/Copyright 2002-[0-9]{4}/Copyright 2002-$current_year/g" $file;
2121
done

0 commit comments

Comments
 (0)