rust-musl-builder/hooks/build
2016-11-25 07:45:10 -05:00

15 lines
292 B
Bash
Executable file

#!/bin/sh
# Abort if anything goes wrong.
set -euo pipefail
# Always map the Docker tag `latest` to stable Rust.
if [ "$DOCKER_TAG" == "latest" ]; then
TOOLCHAIN=stable
else
TOOLCHAIN="$DOCKER_TAG"
fi
# Run the build.
docker build --build-arg TOOLCHAIN="$TOOLCHAIN" -t "$IMAGE_NAME" .