Erwan Gouriou | 831fbed | 2019-03-08 11:39:59 +0100 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | # |
| 3 | # Copyright (c) 2019 Linaro Limited |
| 4 | # |
| 5 | # SPDX-License-Identifier: Apache-2.0 |
| 6 | # |
| 7 | |
| 8 | remote=$1 |
| 9 | url=$2 |
| 10 | local_ref=$3 |
| 11 | local_sha=$4 |
| 12 | remote_ref=$5 |
| 13 | remote_sha=$6 |
| 14 | z40=0000000000000000000000000000000000000000 |
| 15 | |
| 16 | set -e exec |
| 17 | |
| 18 | echo "Run push " |
| 19 | |
| 20 | if [ "$local_sha" = $z40 ] |
| 21 | then |
| 22 | # Handle delete |
| 23 | : |
| 24 | else |
Erwan Gouriou | 48b786b | 2020-09-18 14:17:27 +0200 | [diff] [blame] | 25 | # 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 Gouriou | 831fbed | 2019-03-08 11:39:59 +0100 | [diff] [blame] | 28 | |
| 29 | echo "Perform check patch" |
Erwan Gouriou | 7f84787 | 2019-03-11 08:52:41 +0100 | [diff] [blame] | 30 | ${ZEPHYR_BASE}/scripts/checkpatch.pl --git $range |
Erwan Gouriou | 831fbed | 2019-03-08 11:39:59 +0100 | [diff] [blame] | 31 | fi |