1*62c56f98SSadaf Ebrahimi#!/bin/sh 2*62c56f98SSadaf Ebrahimi# pre-push.sh 3*62c56f98SSadaf Ebrahimi# 4*62c56f98SSadaf Ebrahimi# Copyright The Mbed TLS Contributors 5*62c56f98SSadaf Ebrahimi# SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later 6*62c56f98SSadaf Ebrahimi# 7*62c56f98SSadaf Ebrahimi# Purpose 8*62c56f98SSadaf Ebrahimi# 9*62c56f98SSadaf Ebrahimi# Called by "git push" after it has checked the remote status, but before anything has been 10*62c56f98SSadaf Ebrahimi# pushed. If this script exits with a non-zero status nothing will be pushed. 11*62c56f98SSadaf Ebrahimi# This script can also be used independently, not using git. 12*62c56f98SSadaf Ebrahimi# 13*62c56f98SSadaf Ebrahimi# This hook is called with the following parameters: 14*62c56f98SSadaf Ebrahimi# 15*62c56f98SSadaf Ebrahimi# $1 -- Name of the remote to which the push is being done 16*62c56f98SSadaf Ebrahimi# $2 -- URL to which the push is being done 17*62c56f98SSadaf Ebrahimi# 18*62c56f98SSadaf Ebrahimi# If pushing without using a named remote those arguments will be equal. 19*62c56f98SSadaf Ebrahimi# 20*62c56f98SSadaf Ebrahimi# Information about the commits which are being pushed is supplied as lines to 21*62c56f98SSadaf Ebrahimi# the standard input in the form: 22*62c56f98SSadaf Ebrahimi# 23*62c56f98SSadaf Ebrahimi# <local ref> <local sha1> <remote ref> <remote sha1> 24*62c56f98SSadaf Ebrahimi# 25*62c56f98SSadaf Ebrahimi 26*62c56f98SSadaf EbrahimiREMOTE="$1" 27*62c56f98SSadaf EbrahimiURL="$2" 28*62c56f98SSadaf Ebrahimi 29*62c56f98SSadaf Ebrahimiecho "REMOTE is $REMOTE" 30*62c56f98SSadaf Ebrahimiecho "URL is $URL" 31*62c56f98SSadaf Ebrahimi 32*62c56f98SSadaf Ebrahimiset -eu 33*62c56f98SSadaf Ebrahimi 34*62c56f98SSadaf Ebrahimitests/scripts/all.sh -q -k 'check_*' 35