#!/bin/bash
#
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

# Outputs the git hash of the `tools/` directory.
# The tools git hash is used to tag the Docker build images that get uploaded to ECR.

set -eo pipefail

cd "$(dirname "$0")"
cd "$(git rev-parse --show-toplevel)"

git ls-files -s --full-name "tools/ci-build" | git hash-object --stdin
