rust-musl-builder/hooks/build

15 lines
294 B
Plaintext
Raw Normal View History

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