| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
set -eu |
| 10 |
cd "$(dirname "$0")/.." |
| 11 |
dev=${DEV:-..} |
| 12 |
pkgs() { awk '/^\[\[package\]\]/{n="";v="";s=0} /^name = /{n=$3} /^version = /{v=$3} /^source = /{s=1; print n" "v}' "$@" | tr -d '"' | sort -u; } |
| 13 |
have=$(pkgs "$dev/oxygen/Cargo.lock" "$dev/oxygenhub/Cargo.lock" "$dev/oxygenflow/Cargo.lock") |
| 14 |
need=$(pkgs Cargo.lock) |
| 15 |
missing=$(printf '%s\n' "$need" | grep -vxF "$have" || true) |
| 16 |
if [ -n "$missing" ]; then |
| 17 |
echo "deps-check: these crates are not in the OxygenFlow image's vendored set:" >&2 |
| 18 |
printf '%s\n' "$missing" | sed 's/^/ /' >&2 |
| 19 |
echo "pin a version the image has (cargo update -p NAME --precise V), or rebuild the image with Spectra's workspace" >&2 |
| 20 |
exit 1 |
| 21 |
fi |
| 22 |
echo "deps-check: all $(printf '%s\n' "$need" | wc -l) crates are vendored in the image" |