mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-02 02:00:49 +08:00
5a6c65085a
#### PR Dependency Tree * **PR #14778** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal)
36 lines
1.0 KiB
TypeScript
36 lines
1.0 KiB
TypeScript
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);
|
|
|
|
const version = process.argv[2] || '1.25.4'; // Default to 1.25.4 if no version provided
|
|
|
|
console.log('[*] graphql...');
|
|
execSync(`${PackageRoot}/apollo-codegen-chore.sh "${version}"`, {
|
|
stdio: 'inherit',
|
|
});
|
|
|
|
console.log('[*] rust...');
|
|
execSync(
|
|
'cargo build -p affine_mobile_native --features use-as-lib --lib --release --target aarch64-apple-ios',
|
|
{
|
|
stdio: 'inherit',
|
|
env: { ...process.env, IPHONEOS_DEPLOYMENT_TARGET: '16.5' },
|
|
}
|
|
);
|
|
|
|
execSync(
|
|
`cargo run -p affine_mobile_native --features use-as-lib --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');
|