diff --git a/.gitmodules b/.gitmodules index 92e5c3e7..a0bb8380 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,6 @@ [submodule "third_party/ukey2"] path = third_party/ukey2 - url = sso://team/nearby-eng/ukey2 + url = https://github.com/google/ukey2 branch = master [submodule "third_party/protobuf"] path = third_party/protobuf diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..939e5341 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,28 @@ +# How to Contribute + +We'd love to accept your patches and contributions to this project. There are +just a few small guidelines you need to follow. + +## Contributor License Agreement + +Contributions to this project must be accompanied by a Contributor License +Agreement. You (or your employer) retain the copyright to your contribution; +this simply gives us permission to use and redistribute your contributions as +part of the project. Head over to to see +your current agreements on file or to sign a new one. + +You generally only need to submit a CLA once, so if you've already submitted one +(even if it was for a different project), you probably don't need to do it +again. + +## Code reviews + +All submissions, including submissions by project members, require review. We +use GitHub pull requests for this purpose. Consult +[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more +information on using pull requests. + +## Community Guidelines + +This project follows [Google's Open Source Community +Guidelines](https://opensource.google.com/conduct/). diff --git a/script/oss.py b/script/oss.py index bcf835bf..cd0199d8 100755 --- a/script/oss.py +++ b/script/oss.py @@ -17,6 +17,7 @@ import argparse import os +import re import shutil import sys @@ -34,6 +35,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.""".split("\n") +headline_match=".*Copyright [0-9,\- ]+ Google.*" + MISSING = 0 HEADLINE = 1 PARTIAL = 2 @@ -41,20 +44,24 @@ FULL = 3 def has_copyright(lines, max_lookup=3): pos = 0 + result = MISSING + headline = re.compile(headline_match) for line in lines: pos += 1 # points to the next line - if line.find(copy_header[0]) >= 0: + if headline.match(line) != None: + result = HEADLINE break if pos > max_lookup: - return MISSING - - result = HEADLINE + return result for line in copy_header[1:]: + if pos >= len(lines): + return result if lines[pos].find(line) < 0: return result else: result = PARTIAL + pos += 1 return FULL diff --git a/third_party/ukey2 b/third_party/ukey2 index 2fc30c88..4550c848 160000 --- a/third_party/ukey2 +++ b/third_party/ukey2 @@ -1 +1 @@ -Subproject commit 2fc30c8894da17442c476d9416b5a811bfe88e32 +Subproject commit 4550c84830286c24f8c189cbd54edbbd986a2dd1