2016-11-25 12:49:16 +00:00
|
|
|
#!/bin/bash
|
2016-11-25 12:45:10 +00:00
|
|
|
|
|
|
|
# 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" .
|