1*d4726bddSHONG Yifan#!/usr/bin/env bash 2*d4726bddSHONG Yifanset -eux 3*d4726bddSHONG Yifan 4*d4726bddSHONG Yifan# Normalize working directory to root of repository. 5*d4726bddSHONG Yifancd "$(dirname "${BASH_SOURCE[0]}")"/.. 6*d4726bddSHONG Yifan 7*d4726bddSHONG Yifan# Re-generates all files which may need to be re-generated after changing crate_universe. 8*d4726bddSHONG Yifanfor target in $(bazel query 'kind("crates_vendor", //...)'); do 9*d4726bddSHONG Yifan bazel run "${target}" 10*d4726bddSHONG Yifandone 11*d4726bddSHONG Yifan 12*d4726bddSHONG Yifanfor d in examples/crate_universe/vendor_*; do 13*d4726bddSHONG Yifan (cd "${d}" && CARGO_BAZEL_REPIN=true bazel run :crates_vendor) 14*d4726bddSHONG Yifandone 15*d4726bddSHONG Yifan 16*d4726bddSHONG Yifanfor d in examples/crate_universe* test/no_std 17*d4726bddSHONG Yifando 18*d4726bddSHONG Yifan (cd "${d}" && CARGO_BAZEL_REPIN=true bazel query //... >/dev/null) 19*d4726bddSHONG Yifandone 20*d4726bddSHONG Yifan 21*d4726bddSHONG Yifan# `nix_cross_compiling` special cased as `//...` will invoke Nix. 22*d4726bddSHONG Yifan(cd examples/nix_cross_compiling && CARGO_BAZEL_REPIN=true bazel query @crate_index//... >/dev/null) 23