mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-15 18:12:47 +03:00
24 lines
400 B
Bash
Executable File
24 lines
400 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -euo pipefail
|
|
|
|
build=${1:-}
|
|
|
|
if [[ -z "$build" ]]; then
|
|
build="urbit-image"
|
|
fi
|
|
|
|
say() {
|
|
echo "$1" >&2
|
|
}
|
|
|
|
say "Building $build..."
|
|
image="$(nix-build default.nix --no-out-link -A $build)"
|
|
|
|
say "Loading $image into Docker..."
|
|
tag="$(docker load --quiet --input $image)"
|
|
tag="${tag#Loaded image: }"
|
|
|
|
# Output only the tag on stdout for subsequent pipes/tooling.
|
|
echo $tag
|