Ron Eldor | bf007d2 | 2016-12-15 14:42:37 +0200 | [diff] [blame] | 1 | #!/bin/sh |
Ron Eldor | d731eb8 | 2017-07-23 15:25:32 +0300 | [diff] [blame] | 2 | # pre-push.sh |
| 3 | # |
Bence Szépkúti | 1e14827 | 2020-08-07 13:07:28 +0200 | [diff] [blame] | 4 | # Copyright The Mbed TLS Contributors |
Dave Rodgman | 16799db | 2023-11-02 19:47:20 +0000 | [diff] [blame^] | 5 | # SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later |
Bence Szépkúti | c7da1fe | 2020-05-26 01:54:15 +0200 | [diff] [blame] | 6 | # |
Ron Eldor | d731eb8 | 2017-07-23 15:25:32 +0300 | [diff] [blame] | 7 | # Purpose |
| 8 | # |
Ron Eldor | bf007d2 | 2016-12-15 14:42:37 +0200 | [diff] [blame] | 9 | # Called by "git push" after it has checked the remote status, but before anything has been |
| 10 | # pushed. If this script exits with a non-zero status nothing will be pushed. |
Ron Eldor | d731eb8 | 2017-07-23 15:25:32 +0300 | [diff] [blame] | 11 | # This script can also be used independently, not using git. |
Ron Eldor | bf007d2 | 2016-12-15 14:42:37 +0200 | [diff] [blame] | 12 | # |
| 13 | # This hook is called with the following parameters: |
| 14 | # |
| 15 | # $1 -- Name of the remote to which the push is being done |
| 16 | # $2 -- URL to which the push is being done |
| 17 | # |
| 18 | # If pushing without using a named remote those arguments will be equal. |
| 19 | # |
| 20 | # Information about the commits which are being pushed is supplied as lines to |
| 21 | # the standard input in the form: |
| 22 | # |
| 23 | # <local ref> <local sha1> <remote ref> <remote sha1> |
| 24 | # |
Ron Eldor | bf007d2 | 2016-12-15 14:42:37 +0200 | [diff] [blame] | 25 | |
| 26 | REMOTE="$1" |
| 27 | URL="$2" |
| 28 | |
| 29 | echo "REMOTE is $REMOTE" |
| 30 | echo "URL is $URL" |
| 31 | |
Ron Eldor | d731eb8 | 2017-07-23 15:25:32 +0300 | [diff] [blame] | 32 | set -eu |
| 33 | |
Manuel Pégourié-Gonnard | 129e13c | 2020-06-02 11:54:25 +0200 | [diff] [blame] | 34 | tests/scripts/all.sh -q -k 'check_*' |