2023-04-01 02:08:12 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
#
|
|
|
|
# Copyright 2023 Signal Messenger, LLC.
|
|
|
|
# SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
#
|
|
|
|
|
|
|
|
set -euo pipefail
|
|
|
|
|
2023-12-14 01:12:30 +01:00
|
|
|
SCRIPT_DIR=$(dirname "$0")
|
|
|
|
cd "${SCRIPT_DIR}"/..
|
|
|
|
. bin/build_helpers.sh
|
|
|
|
|
2023-12-13 15:58:04 +01:00
|
|
|
echo "Checking cargo-about version"
|
|
|
|
VERSION=$(cargo about --version)
|
|
|
|
echo "Found $VERSION"
|
|
|
|
|
2023-12-14 01:12:30 +01:00
|
|
|
EXPECTED_VERSION="cargo-about $(cat acknowledgments/cargo-about-version)"
|
2023-12-13 15:58:04 +01:00
|
|
|
if [ "$VERSION" != "$EXPECTED_VERSION" ]; then
|
|
|
|
echo "This tool works with $EXPECTED_VERSION but $VERSION is installed"
|
|
|
|
false
|
|
|
|
fi
|
|
|
|
|
2023-04-01 02:08:12 +02:00
|
|
|
for template in acknowledgments/*.hbs; do
|
|
|
|
echo_then_run cargo about generate --config acknowledgments/about.toml --all-features --fail "$template" --output-file "${template%.hbs}"
|
|
|
|
done
|