mirror of
https://seed.radicle.dev/rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5.git
synced 2026-11-16 00:00:37 +08:00
Instead of hardcoding the version of the Rust alpine file, introduce an `ARG` in the `Dockerfile`. In `build/build`, we determine the version by inspecting `rust-toolchain.toml`, and pass this value in. This ensures that the binaries are built using the same toolchain that we develop with.
8 lines
185 B
Bash
Executable File
8 lines
185 B
Bash
Executable File
#!/bin/sh
|
|
|
|
if ! version=$(grep -m 1 -oP "channel\s*=\s*\K(.*)" rust-toolchain.toml); then
|
|
echo "fatal: no rust version found via rust-toolchain.toml" >&2 ; exit 1
|
|
fi
|
|
|
|
echo "$version"
|