blob: ce43467b41ab114c3a9efabb36a636049a1e2d2a [file] [log] [blame]
Ron Eldorbf007d22016-12-15 14:42:37 +02001#!/bin/sh
Ron Eldord731eb82017-07-23 15:25:32 +03002# pre-push.sh
3#
Bence Szépkúti1e148272020-08-07 13:07:28 +02004# Copyright The Mbed TLS Contributors
Bence Szépkútic7da1fe2020-05-26 01:54:15 +02005# SPDX-License-Identifier: Apache-2.0
6#
7# Licensed under the Apache License, Version 2.0 (the "License"); you may
8# not use this file except in compliance with the License.
9# You may obtain a copy of the License at
10#
11# http://www.apache.org/licenses/LICENSE-2.0
12#
13# Unless required by applicable law or agreed to in writing, software
14# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16# See the License for the specific language governing permissions and
17# limitations under the License.
18#
Ron Eldord731eb82017-07-23 15:25:32 +030019# Purpose
20#
Ron Eldorbf007d22016-12-15 14:42:37 +020021# Called by "git push" after it has checked the remote status, but before anything has been
22# pushed. If this script exits with a non-zero status nothing will be pushed.
Ron Eldord731eb82017-07-23 15:25:32 +030023# This script can also be used independently, not using git.
Ron Eldorbf007d22016-12-15 14:42:37 +020024#
25# This hook is called with the following parameters:
26#
27# $1 -- Name of the remote to which the push is being done
28# $2 -- URL to which the push is being done
29#
30# If pushing without using a named remote those arguments will be equal.
31#
32# Information about the commits which are being pushed is supplied as lines to
33# the standard input in the form:
34#
35# <local ref> <local sha1> <remote ref> <remote sha1>
36#
Ron Eldorbf007d22016-12-15 14:42:37 +020037
38REMOTE="$1"
39URL="$2"
40
41echo "REMOTE is $REMOTE"
42echo "URL is $URL"
43
Ron Eldord731eb82017-07-23 15:25:32 +030044set -eu
45
Manuel Pégourié-Gonnard129e13c2020-06-02 11:54:25 +020046tests/scripts/all.sh -q -k 'check_*'