#!/bin/sh # Builds Lune for the Mac: desktop/build.sh [extra tauri --config ...] # Makes the .dmg people download and the .app.tar.gz the updater installs; then publish both on the hub that holds # the signing key: lunehub release publish set -eu cd "$(dirname "$0")" v=${1:?usage: desktop/build.sh } shift if grep -q '"pubkey": ""' tauri.conf.json; then echo "note: no update key in tauri.conf.json yet — this build won't accept updates (run lunehub release keygen)" >&2 fi npx tauri build --bundles app,dmg --config "{\"version\":\"$v\"}" "$@" b=../target/release/bundle # macOS tar would add ._ resource-fork entries that the updater can't unpack. COPYFILE_DISABLE=1 tar --no-mac-metadata -czf "$b/Lune_${v}_aarch64.app.tar.gz" -C "$b/macos" Lune.app echo "Built:" echo " $(cd "$b" && pwd)/dmg/Lune_${v}_aarch64.dmg" echo " $(cd "$b" && pwd)/Lune_${v}_aarch64.app.tar.gz"