mirror of
https://github.com/storytold/photocraft.git
synced 2026-11-02 06:17:22 -06:00
* Honor CARGO_BUILD_TARGET in FreeBSD packaging for aarch64 release builds package.sh took the arch from uname -m. The release VM is an x86_64 guest that cross-compiles aarch64 with CARGO_BUILD_TARGET set, so an aarch64 build was named freebsd-x86_64 and read binaries from the host target dir. Read the arch from CARGO_BUILD_TARGET when it is set, and read binaries from target/<triple>/release. Skip the man-page example and the --version run when cross-building, since the aarch64 binaries cannot run on the x86_64 guest. Unset CARGO_BUILD_TARGET keeps the old behavior. * Reject unsupported CARGO_BUILD_TARGET and resolve host-tuple in FreeBSD packaging Accept only x86_64-unknown-freebsd and aarch64-unknown-freebsd. Any other target exits 2 before any build, so a non-FreeBSD target cannot be packaged as an x86_64 FreeBSD archive. Resolve cargo's host-tuple alias to the real host triple before choosing the binary dir, so the path matches cargo's output. * Skip the photocraft-cli --version run when CARGO_BUILD_TARGET is set A target build's binary may not run on the host (aarch64 on the x86_64 VM), and under set -e the smoke run would fail the release after the archive is written. The native path (CARGO_BUILD_TARGET unset) still runs it.