chore(ios): optimize build workflow (#11132)

This commit is contained in:
EYHN
2025-03-24 14:32:45 +00:00
parent 80d451cc51
commit c1b3e25fc7
123 changed files with 3964 additions and 109 deletions
+33
View File
@@ -0,0 +1,33 @@
import { execSync } from 'node:child_process';
import { ProjectRoot } from '@affine-tools/utils/path';
import { Package } from '@affine-tools/utils/workspace';
const iosPackage = new Package('@affine/ios');
const PackageRoot = iosPackage.path;
console.log('[*] PackageRoot', PackageRoot);
console.log('[*] graphql...');
execSync(
`${PackageRoot}/App/Packages/AffineGraphQL/apollo-ios-cli generate --path ${PackageRoot}/apollo-codegen-config.json`,
{ stdio: 'inherit' }
);
console.log('[*] rust...');
execSync(
'cargo build -p affine_mobile_native --lib --release --target aarch64-apple-ios',
{
stdio: 'inherit',
}
);
execSync(
`cargo run -p affine_mobile_native --bin uniffi-bindgen generate \
--library ${ProjectRoot}/target/aarch64-apple-ios/release/libaffine_mobile_native.a \
--language swift --out-dir ${PackageRoot}/App/App/uniffi`,
{ stdio: 'inherit' }
);
console.log('[+] codegen complete');