Skip to content

🎥 Make videos programmatically with React

simplify

Jonny Burgerd99e2360f0de
diff --git a/packages/cloudrun/build.ts b/packages/cloudrun/build.ts
index a05b0620a3..0e3f169b17 100644
--- a/packages/cloudrun/build.ts
+++ b/packages/cloudrun/build.ts
@@ -1,9 +1,11 @@
import {$} from 'bun';
+import {bundleInstaller} from './src/admin/bundle-installer';
+import {bundleRenderLogic} from './src/admin/bundle-renderLogic';
await $`bun x tsc -d`;
const permissions = Bun.file('src/shared/sa-permissions.json');
await Bun.write('dist/shared/sa-permissions.json', permissions);
-await $`bun run buildContainer`;
-await $`bun run tarInstaller`;
+await bundleRenderLogic();
+await bundleInstaller();
diff --git a/packages/cloudrun/src/admin/bundle-installer.ts b/packages/cloudrun/src/admin/bundle-installer.ts
index 9fb82d1776..77dc19c9d6 100644
--- a/packages/cloudrun/src/admin/bundle-installer.ts
+++ b/packages/cloudrun/src/admin/bundle-installer.ts
@@ -12,7 +12,7 @@ export const hasGTar = () => {
}
};
-const bundleInstaller = async () => {
+export const bundleInstaller = async () => {
const outdir = path.join(__dirname, '..', `build-installer`);
mkdirSync(outdir, {recursive: true});
@@ -63,5 +63,3 @@ const bundleInstaller = async () => {
rmSync(outdir, {recursive: true});
};
-
-bundleInstaller();
diff --git a/packages/cloudrun/src/admin/bundle-renderLogic.ts b/packages/cloudrun/src/admin/bundle-renderLogic.ts
index e5672e2389..b1e6bcc77f 100644
--- a/packages/cloudrun/src/admin/bundle-renderLogic.ts
+++ b/packages/cloudrun/src/admin/bundle-renderLogic.ts
@@ -3,7 +3,7 @@ import {dir} from '@remotion/compositor-linux-x64-gnu';
import fs from 'fs';
import path from 'path';
-const bundleRenderLogic = async () => {
+export const bundleRenderLogic = async () => {
const outdir = path.join(__dirname, '../../container/dist');
fs.mkdirSync(outdir, {
recursive: true,
@@ -55,5 +55,3 @@ const bundleRenderLogic = async () => {
console.log('distribution bundled.');
};
-
-bundleRenderLogic();
diff --git a/packages/example/testcloudrun.sh b/packages/example/testcloudrun.sh
index 7acefaedd4..b9bda8f917 100644
--- a/packages/example/testcloudrun.sh
+++ b/packages/example/testcloudrun.sh
@@ -4,7 +4,7 @@ cd renderer
node build.mjs --cloudrun
cd ..
cd cloudrun
-pnpm run buildContainer
+bun run build
cd container
ARTIFACT_REGISTRY_ENV=development node submit.mjs
cd ..