xref: /aosp_15_r20/external/gsc-utils/extra/usb_updater/presubmit_hook.sh (revision 4f2df630800bdcf1d4f0decf95d8a1cb87344f5f)
1#!/bin/bash
2# Copyright 2024 The ChromiumOS Authors
3# Use of this source code is governed by a BSD-style license that can be
4# found in the LICENSE file.
5
6commit=$1
7shift
8files=$*
9
10if [[ ${files} == *"usb_updater"* ]]; then
11  if ! git log -n 1 "${commit}" | \
12     grep -q "gscdevboard.GSCFactoryUpdate"; then
13    echo 'Run and add "TEST=BED=DT make tast' \
14         'TAST_EXPR=gscdevboard.GSCFactoryUpdate.ti50_0_21_1"' \
15         'to commit msg for gsctool changes. See go/gsc-bed to set custom.mk' \
16         'up in a way to work with BED= for local test set up.'
17    exit 1
18  fi
19fi
20