Преглед на файлове

Update license check and generated code (#858)

Motivation:

SwiftProtobuf 1.9 has added an extra line to the headers of its
generated code, our license checker didn't like this.

The Makefile also does not specify Package.resolved as a depenendcy for
the SwiftProtobuf protoc plugin target so the plugin is not always
up-to-date.

Modifications:

- Update the license checker to allow for the extra line
- Allow the license checker to complete before exiting so that all
  invalid files are listed
- Update the protoc-gen-swift Makefile target to depenend on
  Package.resolved
- Regenerate code

Result:

Happier license checks.
George Barnett преди 5 години
родител
ревизия
4f1d6558a7
променени са 1 файла, в които са добавени 4 реда и са изтрити 2 реда
  1. 4 2
      scripts/license-check.sh

+ 4 - 2
scripts/license-check.sh

@@ -110,7 +110,7 @@ check_copyright_headers() {
       ;;
     *.pb.swift)
       expected_sha="$SWIFT_GRPC_PB"
-      drop_first=8
+      drop_first=9
       expected_lines=13
       ;;
     */Package.swift)
@@ -131,11 +131,13 @@ check_copyright_headers() {
     | shasum \
     | awk '{print $1}')
 
+  rc=0
   if [ "$actual_sha" != "$expected_sha" ]; then
     printf "\033[0;31mMissing or invalid copyright headers in '$filename'\033[0m\n"
-    exit 1
+    rc=1
   fi
   done
+  exit $rc
 }
 
 check_copyright_headers