Files
breeze/scripts/check-packages.sh
T
waozi e5e203ce89 Fetch dependencies as Ziran packages instead of submodules
ziran.toml and ziran.lock pin the Ziran toolchain, Kryon, Game2D, the Daochi
client, and the C libraries (as source packages) at the commits the vendor
submodules used. scripts/packages.sh bootstraps the locked toolchain, runs
ziran fetch, and links each checkout under build/packages/; make, Gradle, and
CI run it before building. make package-check replaces no-vendor-edits.
2026-09-27 16:44:19 -03:00

32 lines
1.0 KiB
Bash

#!/bin/sh
# Every locked dependency must be an unmodified checkout of its locked commit.
# Local ziran.local.toml overrides point at working repositories and are
# reported rather than checked; release builds use --locked, which rejects them.
set -eu
root=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
cd "$root"
[ -f build/packages/.complete ] || sh scripts/packages.sh
status=0
for link in build/packages/*; do
[ -L "$link" ] || continue
name=$(basename "$link")
path=$(readlink "$link")
case "$path" in
"${XDG_CACHE_HOME:-$HOME/.cache}"/ziran/sources/*) ;;
*) echo "package $name uses local override $path"; continue ;;
esac
if [ -n "$(git -C "$path" status --porcelain --ignore-submodules=none)" ]; then
echo "Modified package checkout: $name ($path)"
git -C "$path" status --short
status=1
fi
done
if [ "$status" -ne 0 ]; then
echo
echo "Do not edit dependencies from Inbe. Change the owning repository, commit and push there, then run ziran update NAME here."
exit 1
fi