5ad1289419
Deploy / build-windows (push) Successful in 1m54s
Deploy / build-linux-web (push) Failing after 13m1s
Deploy / build-macos (push) Has been skipped
Deploy / build-android (push) Has been skipped
Deploy / build-ios (push) Has been skipped
Deploy / release-deploy (push) Has been skipped
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
34 lines
1.1 KiB
Bash
Executable File
34 lines
1.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# compile-macos.sh <tag> — build Flutter macOS desktop, package into dist/
|
|
set -euo pipefail
|
|
|
|
# shellcheck source=scripts/ci/_env.sh
|
|
. "$(dirname "$0")/_env.sh"
|
|
|
|
TAG="$1"
|
|
VER="${TAG#v}"
|
|
|
|
echo "==> compile-macos: version=${VER}"
|
|
|
|
# Sync Flutter pubspec version (BSD sed on macOS)
|
|
sed -i '' "s/^version:.*/version: ${VER}+1/" client/pubspec.yaml
|
|
|
|
# Build Flutter macOS
|
|
cd client
|
|
flutter build macos --release \
|
|
"--dart-define=BASE_URL=https://jiu.51yanmei.com" \
|
|
"--dart-define=PUBLIC_URL=https://jiu.51yanmei.com" \
|
|
"--dart-define=APP_VERSION=${TAG}"
|
|
cd ..
|
|
|
|
# Package .app bundle into zip
|
|
# ditto preserves symlinks, Unix permissions, and extended attributes (code-signing).
|
|
# Python's zipfile follows symlinks and drops permissions — do NOT use it for .app bundles.
|
|
mkdir -p dist
|
|
APP_SRC="client/build/macos/Build/Products/Release/jiu_client.app"
|
|
ditto -c -k --keepParent "${APP_SRC}" dist/jiu-macos-x64.zip
|
|
echo "Packaged dist/jiu-macos-x64.zip ($(du -sh dist/jiu-macos-x64.zip | cut -f1))"
|
|
|
|
echo "==> compile-macos: done — dist/ contents:"
|
|
ls -lh dist/
|