File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -108,8 +108,14 @@ jobs:
108
108
for ios_header in *.h; do
109
109
# Each file in this directory matches a file in the Analytics iOS SDK.
110
110
cp -vf "${podtmp}/${header_dir}/${ios_header}" .
111
+ # If the file doesn't have a Google copyright, add one.
112
+ if ! grep -q "^// Copyright [0-9]* Google LLC" "${ios_header}"; then
113
+ copyright_line="// Copyright $(date +%Y) Google LLC\n"
114
+ else
115
+ copyright_line=
116
+ fi
111
117
# Add a note to each file about its source.
112
- sed -i~ ' s|^/// @file|\n// Copied from Firebase Analytics iOS SDK '" ${analytics_version}"' .\n\n/// @file|' "${ios_header}"
118
+ sed -i~ " s|^/// @file|${copyright_line} \n// Copied from Firebase Analytics iOS SDK ${analytics_version}.\n\n/// @file|" "${ios_header}"
113
119
rm -f "${ios_header}~" # remove backup file that sed generated
114
120
python ../../scripts/format_code.py --f "${ios_header}"
115
121
done
You can’t perform that action at this time.
0 commit comments