blob: 44922367f98888b20959c6e574633b223862de86 [file] [log] [blame]
Erwan Gouriou831fbed2019-03-08 11:39:59 +01001#!/bin/sh
2#
3# Copyright (c) 2019 Linaro Limited
4#
5# SPDX-License-Identifier: Apache-2.0
6#
7
8remote=$1
9url=$2
10local_ref=$3
11local_sha=$4
12remote_ref=$5
13remote_sha=$6
14z40=0000000000000000000000000000000000000000
15
16set -e exec
17
18echo "Run push "
19
20if [ "$local_sha" = $z40 ]
21then
22 # Handle delete
23 :
24else
Erwan Gouriou48b786b2020-09-18 14:17:27 +020025 # At each (forced) push, examine all commits since $remote/master
26 base_commit=`git rev-parse $remote/master`
27 range="$base_commit..$local_sha"
Erwan Gouriou831fbed2019-03-08 11:39:59 +010028
29 echo "Perform check patch"
Erwan Gouriou7f847872019-03-11 08:52:41 +010030 ${ZEPHYR_BASE}/scripts/checkpatch.pl --git $range
Erwan Gouriou831fbed2019-03-08 11:39:59 +010031fi