#!/bin/bash set -euo pipefail # Build zsnap for musl target echo "Building zsnap for x86_64-unknown-linux-musl..." # Install musl target if not already installed rustup target add x86_64-unknown-linux-musl # Build the binary cargo build --release --target x86_64-unknown-linux-musl --target-dir target/ echo "Build completed successfully!" echo "Binary location: target/x86_64-unknown-linux-musl/release/zsnap" # Build and push container image echo "Building container image..." podman build -t cr.d464.sh/zsnap:latest . echo "Pushing container image..." podman push cr.d464.sh/zsnap:latest echo "Container image pushed successfully!"