diff options
author | Alexander Kiryukhin <a.kiryukhin@mail.ru> | 2020-02-24 23:32:19 +0300 |
---|---|---|
committer | Alexander Kiryukhin <a.kiryukhin@mail.ru> | 2020-02-24 23:32:19 +0300 |
commit | 9b2032538ad45982fcf4acb5e35ec3f970c18deb (patch) | |
tree | 2bfd5f8cd4f1594df200a27c1362338e04832569 /checklicense.sh | |
parent | 6e716c0eb8958c5d7700e0712a175e8e98d0ba0a (diff) |
Added CI files
Diffstat (limited to 'checklicense.sh')
-rwxr-xr-x | checklicense.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/checklicense.sh b/checklicense.sh new file mode 100755 index 0000000..587c36c --- /dev/null +++ b/checklicense.sh @@ -0,0 +1,17 @@ +#!/bin/bash -e + +ERROR_COUNT=0 +while read -r file +do + case "$(head -1 "${file}")" in + *"Copyright (c) "*" Alexander Kiryukhin <a.kiryukhin@mail.ru>") + # everything's cool + ;; + *) + echo "$file is missing license header." + (( ERROR_COUNT++ )) + ;; + esac +done < <(git ls-files "*\.go") + +exit $ERROR_COUNT
\ No newline at end of file |