Skip to content

Commit

Permalink
Update year in licensing setup (#462)
Browse files Browse the repository at this point in the history
This changes the year in LICENSE.txt and the check_license script to
allow any year in the license header.
  • Loading branch information
abhinav committed Jun 30, 2017
1 parent e15639d commit 0bd02a6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2016 Uber Technologies, Inc.
Copyright (c) 2016-2017 Uber Technologies, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
20 changes: 11 additions & 9 deletions check_license.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
#!/bin/bash

text=`head -1 LICENSE.txt`
#!/bin/bash -e

ERROR_COUNT=0
while read file
while read -r file
do
head -1 ${file} | grep -q "${text}"
if [ $? -ne 0 ]; then
echo "$file is missing license header."
(( ERROR_COUNT++ ))
fi
case "$(head -1 "${file}")" in
*"Copyright (c) "*" Uber Technologies, Inc.")
# everything's cool
;;
*)
echo "$file is missing license header."
(( ERROR_COUNT++ ))
;;
esac
done < <(git ls-files "*\.go")

exit $ERROR_COUNT

0 comments on commit 0bd02a6

Please sign in to comment.