rust-musl-builder/hooks/build
2016-11-25 07:49:16 -05:00

15 lines
294 B
Bash
Executable file

#!/bin/bash
# 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" .