mirror of
https://github.com/EthanShoeDev/fressh.git
synced 2026-01-12 23:02:49 +00:00
passing lint
This commit is contained in:
23
packages/react-native-uniffi-russh/scripts/native-build.ts
Normal file
23
packages/react-native-uniffi-russh/scripts/native-build.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import * as child from 'child_process';
|
||||
import * as os from 'os';
|
||||
|
||||
const targetOptions = ['ios', 'android'] as const;
|
||||
type Target = (typeof targetOptions)[number];
|
||||
|
||||
const envTarget = process.env.MOBILE_TARGET as Target | undefined;
|
||||
if (envTarget && !targetOptions.includes(envTarget))
|
||||
throw new Error(`Invalid target: ${envTarget}`);
|
||||
|
||||
const target =
|
||||
envTarget ??
|
||||
(() => {
|
||||
const uname = os.platform();
|
||||
if (uname === 'darwin') return 'ios';
|
||||
return 'android';
|
||||
})();
|
||||
|
||||
console.log(`Building for ${target}`);
|
||||
|
||||
child.execSync(`turbo run build:${target} --ui stream`, {
|
||||
stdio: 'inherit',
|
||||
});
|
||||
Reference in New Issue
Block a user