23 lines
729 B
Bash
Executable File
23 lines
729 B
Bash
Executable File
#!/bin/sh
|
|
# Build all flake-hub packages and push to attic
|
|
set -e
|
|
|
|
ARCH="$1"
|
|
ATTIC_CACHE="attic-infra-cache-k3s-1"
|
|
ATTIC_SERVER="https://nix-cache-upload.oleks.space"
|
|
|
|
echo "=== Building flake-hub packages for ${ARCH} ==="
|
|
|
|
# Setup attic
|
|
attic=$(nix build --inputs-from . nixpkgs#attic-client --print-out-paths --no-link)/bin/attic
|
|
"${attic}" login ci "${ATTIC_SERVER}" "${ATTIC_TOKEN}"
|
|
|
|
echo "Building packages..."
|
|
out=$(nix build ".#packages.${ARCH}.hello-world" --print-build-logs --print-out-paths --no-link)
|
|
"${attic}" push "${ATTIC_CACHE}" "${out}"
|
|
|
|
out=$(nix build ".#packages.${ARCH}.xonsh" --print-build-logs --print-out-paths --no-link)
|
|
"${attic}" push "${ATTIC_CACHE}" "${out}"
|
|
|
|
echo "✅ Build completed for ${ARCH}"
|