#!/bin/sh
#
# This script runs as the top level of our reproducible build process.
# It launches the actual build script inside a docker container.

## use a fixed image to not suffer from image retaging when newer rustc or
## alpine emerges. Increase shm size for the reasons described in
## reproducible_build
##
## If you change this image, make sure also to change the one listed in
## the build-repro job in .gitlab-ci.yml
exec docker run --rm -i -v "$(git rev-parse --show-toplevel)":/builds/arti \
		-w /builds/arti --shm-size=512m rust:1.59.0-alpine3.15 \
		./maint/reproducible_build "$@"
