#!/usr/bin/env bash # # Use nightly rustdoc to make sure that the expected list of APIs is exported # from the `arti` crate when built with --features=full. # # Requires jq and diff. set -eou pipefail EXPECTED_PUBLIC_MEMBERS=$(cat <"$TEMPDIR/public_paths" echo "$EXPECTED_PUBLIC_MEMBERS" >"$TEMPDIR/expected_public_paths" if diff -u "$TEMPDIR/expected_public_paths" "$TEMPDIR/public_paths"; then echo "No changes; all public APIs in arti are as expected" exit 0 else echo "List of public APIs in arti crate are not as expected!" >&2 echo "(See above for diff from expected)" >&2 exit 1 fi