Skip to content

Commit

Permalink
[FAB-5751] Add .gitreview
Browse files Browse the repository at this point in the history
Change-Id: Idafcbf11bfd0fff5cdaa87358ee0e371cc22f516
Signed-off-by: David Geng <[email protected]>
  • Loading branch information
David Geng committed Aug 13, 2017
1 parent 6ed4b84 commit f0c65f3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
9 changes: 9 additions & 0 deletions .gitreview
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#
# Copyright ArxanFintech Ltd. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
[gerrit]
host=gerrit.hyperledger.org
port=29418
project=fabric-sdk-go
8 changes: 4 additions & 4 deletions test/scripts/check_license.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@
# SPDX-License-Identifier: Apache-2.0
#

CHECK=$(git diff --name-only HEAD --diff-filter=ACMRTUXB * | grep -v .png$ | grep -v .rst$ | grep -v .git \
CHECK=$(git diff --name-only HEAD --diff-filter=ACMRTUXB * | grep -v .png$ | grep -v .rst$ | grep -v ^.git$ \
| grep -v .pem$ | grep -v .block$ | grep -v .tx$ | grep -v ^LICENSE$ | grep -v _sk$ \
| grep -v .key$ | grep -v \\.gen.go$ \
| grep -v .md$ | grep -v ^vendor/ | grep -v ^build/ | grep -v .pb.go$ | sort -u)

if [[ -z "$CHECK" ]]; then
CHECK=$(git diff-tree --no-commit-id --name-only --diff-filter=ACMRTUXB -r $(git log -2 \
--pretty=format:"%h") | grep -v .png$ | grep -v .rst$ | grep -v .git \
--pretty=format:"%h") | grep -v .png$ | grep -v .rst$ | grep -v ^.git$ \
| grep -v .pem$ | grep -v .block$ | grep -v .tx$ | grep -v ^LICENSE$ | grep -v _sk$ \
| grep -v .key$ | grep -v \\.gen.go$ \
| grep -v .md$ | grep -v ^vendor/ | grep -v ^build/ | grep -v .pb.go$ | sort -u)
fi

echo "Checking committed files for SPDX-License-Identifier headers ..."
missing=`echo $CHECK | xargs grep -L "SPDX-License-Identifier"`
if [ -z "$missing" ]; then
missing=`echo "$CHECK" | xargs grep -L "SPDX-License-Identifier"`
if [[ -z "$missing" ]]; then
echo "All files have SPDX-License-Identifier headers"
exit 0
fi
Expand Down

0 comments on commit f0c65f3

Please sign in to comment.