2019-03-08 18:39:59 +08:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Copyright (c) 2019 Linaro Limited
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
#
|
|
|
|
|
|
|
|
remote=$1
|
|
|
|
url=$2
|
|
|
|
local_ref=$3
|
|
|
|
local_sha=$4
|
|
|
|
remote_ref=$5
|
|
|
|
remote_sha=$6
|
|
|
|
z40=0000000000000000000000000000000000000000
|
|
|
|
|
|
|
|
set -e exec
|
|
|
|
|
|
|
|
echo "Run push "
|
|
|
|
|
|
|
|
if [ "$local_sha" = $z40 ]
|
|
|
|
then
|
|
|
|
# Handle delete
|
|
|
|
:
|
|
|
|
else
|
2021-05-19 18:18:21 +08:00
|
|
|
# At each (forced) push, examine all commits since $remote/main
|
|
|
|
base_commit=`git rev-parse $remote/main`
|
2020-09-18 20:17:27 +08:00
|
|
|
range="$base_commit..$local_sha"
|
2019-03-08 18:39:59 +08:00
|
|
|
|
|
|
|
echo "Perform check patch"
|
2019-03-11 15:52:41 +08:00
|
|
|
${ZEPHYR_BASE}/scripts/checkpatch.pl --git $range
|
2019-03-08 18:39:59 +08:00
|
|
|
fi
|