foundry 765 B

123456789101112131415161718
  1. #!/usr/bin/env bash
  2. # This script is a wrapper around the foundry Docker image.
  3. # In an ideal world, we could just use anvil (and forge) directly, but there are regular
  4. # upstream breaking changes in the nightly builds, and binaries of older
  5. # versions are deleted frequently from their GitHub. The Docker releases are
  6. # available for longer, so we just use those here.
  7. #
  8. # the DOCKER_ARGS environment variable can be used to pass additional args to docker.
  9. set -eo pipefail
  10. # This is a known-to-be-working build.
  11. DOCKER_IMAGE="ghcr.io/foundry-rs/foundry:nightly-0d4468765c264d00ac961275fe176ce003d3e4ca@sha256:88fe2ea1005b9a3a7f8068645fef4cfb0fa7c16a5dd3b35582c70a1e36d16c25"
  12. args=$(printf '"%s" ' "$@")
  13. docker run --rm -i $DOCKER_ARGS $DOCKER_IMAGE "$args"