Build und Deploy getrennt: gemeinsames build.sh, Deploy-Skripte pro OS
build.sh baut nur noch (OS-Weiche für die Bundle-Liste: macOS app,dmg, Linux deb,rpm, Git-Bash nsis); die macOS-Nachbereitung (lsregister, .noindex) zieht nach deploy-macos.sh um. deploy-linux.sh installiert das jüngste Bundle (dnf: rpm -Uvh --force, apt: dpkg -i), deploy-windows.ps1 startet den NSIS-Installer.
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
# Gemeinsamer Release-Build für macOS/Linux (Windows: unter Git-Bash läuft
|
||||
# auch dieses Script). Baut nur — ausrollen macht das jeweilige
|
||||
# deploy-<os>-Script.
|
||||
set -euo pipefail
|
||||
|
||||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
@@ -8,22 +11,20 @@ export RUSTUP_HOME="$HOME/tools/.rustup"
|
||||
export PATH="$CARGO_HOME/bin:$PATH"
|
||||
|
||||
cd "$DIR"
|
||||
# CI=true: DMG ohne Finder-AppleScript (Fenster-Layout) bauen — das Script
|
||||
# wäre aus Nicht-GUI-Shells TCC-blockiert.
|
||||
CI=true npm run tauri build -- --bundles app,dmg "$@"
|
||||
|
||||
# Dev-Bundle in ein .noindex-Verzeichnis schieben und aus Launch Services
|
||||
# austragen — Spotlight indiziert .noindex-Ordner nicht, damit erscheint im
|
||||
# Starter/Spotlight nur die installierte Kopie unter ~/Applications.
|
||||
BUNDLE="$DIR/src-tauri/target/release/bundle/macos"
|
||||
NOINDEX="$DIR/src-tauri/target/release/bundle/macos.noindex"
|
||||
LSREGISTER=/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister
|
||||
# lsregister -u meldet -10814, wenn das Bundle nicht registriert ist —
|
||||
# erwartetes Ergebnis, kein Fehler.
|
||||
"$LSREGISTER" -u "$BUNDLE/ai-control.app" || true
|
||||
rm -rf "$NOINDEX/ai-control.app"
|
||||
mkdir -p "$NOINDEX"
|
||||
mv "$BUNDLE/ai-control.app" "$NOINDEX/"
|
||||
"$LSREGISTER" -u "$NOINDEX/ai-control.app" || true
|
||||
|
||||
echo "DMG: $(ls "$DIR"/src-tauri/target/release/bundle/dmg/*.dmg)"
|
||||
case "$(uname -s)" in
|
||||
Darwin)
|
||||
# CI=true: DMG ohne Finder-AppleScript (Fenster-Layout) bauen — das Script
|
||||
# wäre aus Nicht-GUI-Shells TCC-blockiert.
|
||||
CI=true npm run tauri build -- --bundles app,dmg "$@"
|
||||
;;
|
||||
Linux)
|
||||
npm run tauri build -- --bundles deb,rpm "$@"
|
||||
;;
|
||||
MINGW* | MSYS*)
|
||||
npm run tauri build -- --bundles nsis "$@"
|
||||
;;
|
||||
*)
|
||||
echo "unbekanntes OS: $(uname -s)" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
Reference in New Issue
Block a user