mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 20:38:52 +00:00
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Fetch copilot model options per prompt (default, optional, pro) with generated GraphQL query and schema types. * **Chores** * Upgraded iOS deps: Apollo iOS 1.23.0, EventSource 0.1.5, Swift Collections 1.2.1. * Switched Intelligents to static linking and updated project integration. * Parameterized and standardized GraphQL codegen tooling; setup automation now syncs versions and safely backs up/restores custom scalars. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
29 lines
975 B
Bash
Executable File
29 lines
975 B
Bash
Executable File
#!/bin/zsh
|
|
|
|
cd "$(dirname "$0")"
|
|
|
|
set -euo pipefail
|
|
|
|
VERSION=${1:-"1.23.0"} # Use first argument or default to 1.23.0
|
|
echo "📦 Apollo Version: $VERSION"
|
|
|
|
sed -i '' "s|apollo-ios\.git\", from: \"[^\"]*\"|apollo-ios.git\", from: \"$VERSION\"|" "App/Packages/Intelligents/Package.swift"
|
|
echo "✅ Version synced"
|
|
|
|
mkdir -p "App/Packages/AffineGraphQL/apollo-ios-cli"
|
|
curl -L "https://github.com/apollographql/apollo-ios/releases/download/$VERSION/apollo-ios-cli.tar.gz" | tar -xz -C "App/Packages/AffineGraphQL/apollo-ios-cli"
|
|
echo "✅ CLI downloaded"
|
|
|
|
CLI_BIN=$(find App/Packages/AffineGraphQL/apollo-ios-cli -type f -perm +111 -name 'apollo-ios-cli' | head -n 1)
|
|
[ -z "$CLI_BIN" ] && { echo "❌ apollo-ios-cli executable not found"; exit 1; }
|
|
echo "🔧 Using binary tool at: $CLI_BIN"
|
|
|
|
$CLI_BIN generate --path "apollo-codegen-config.json" --ignore-version-mismatch
|
|
echo "✅ Code generated"
|
|
|
|
rm -rf "App/Packages/AffineGraphQL/apollo-ios-cli"
|
|
echo "🧹 Cleaned up"
|
|
|
|
|
|
|