🎥 Make videos programmatically with React
Update ensure-version-match.js
Jonny Burger386dcd7d2a33
diff --git a/packages/lambda/ensure-version-match.js b/packages/lambda/ensure-version-match.jsindex 52d409fb1c..1ed739d63e 100644--- a/packages/lambda/ensure-version-match.js+++ b/packages/lambda/ensure-version-match.js@@ -1,5 +1,6 @@const cp = require('node:child_process');const fs = require('node:fs');+const {VERSION} = require('remotion');const versions = [`remotionlambda-arm64.zip`];@@ -7,17 +8,17 @@ for (const version of versions) {cp.execSync(`unzip -o ${version} -d extracted`);const contents = fs.readFileSync('extracted/index.js', 'utf-8');fs.rmSync('extracted', {recursive: true});- const [, inLambda] = contents.match(/VERSION = "(.*)"/);-const inConstants = fs.readFileSync('../core/dist/cjs/version.js', 'utf-8');const [, inPkg] = inConstants.match(/exports\.VERSION = '(.*)'/);- if (inLambda !== inPkg) {+ const inLambda = contents.includes(`="${VERSION}"`);++ if (!inLambda) {console.error(- `Version in Lambda is ${inLambda}, and in package ${inPkg}. Align the versions.`+ `Version is not aligned in lambda, and in package ${inPkg}. Align the versions.`,);process.exit(1);}- console.log(`Lambda version ${inLambda} aligns in ${version}`);+ console.log(`Lambda version aligns in ${version}`);}