🎥 Make videos programmatically with React
introduce lambda prepublish script again
Jonny Burgeraedc9054e567
diff --git a/packages/core/src/version.ts b/packages/core/src/version.tsindex 42deb55530..2f9c4c2058 100644--- a/packages/core/src/version.ts+++ b/packages/core/src/version.ts@@ -1,2 +1,2 @@// Automatically generated on publish-export const VERSION = '3.2.5';+export const VERSION = '3.2.6';diff --git a/packages/lambda/ensure-version-match.js b/packages/lambda/ensure-version-match.jsnew file mode 100644index 0000000000..877e0f7244--- /dev/null+++ b/packages/lambda/ensure-version-match.js@@ -0,0 +1,19 @@+const cp = require('node:child_process');+const fs = require('node:fs');++cp.execSync('unzip -o remotionlambda.zip -d extracted');+const contents = fs.readFileSync('extracted/index.js', 'utf-8');+fs.rmSync('extracted', {recursive: true});+const [, inLambda] = contents.match(/exports\.VERSION = "(.*)"/);++const inConstants = fs.readFileSync('dist/shared/constants.js', 'utf-8');+const [, inPkg] = inConstants.match(/exports\.VERSION = '(.*)'/);++if (inLambda !== inPkg) {+ console.error(+ `Version in Lambda is ${inLambda}, and in package ${inPkg}. Align the versions.`+ );+ process.exit(1);+}++console.log(`Lambda version ${inLambda} aligns.`);diff --git a/packages/lambda/package.json b/packages/lambda/package.jsonindex 0fbe86a6a7..08b0a3f173 100644--- a/packages/lambda/package.json+++ b/packages/lambda/package.json@@ -15,7 +15,8 @@"watch": "tsc -w","build": "tsc -d && pnpm run buildlambda","buildlambda": "ts-node src/admin/bundle-lambda.ts",- "start": "ts-node src/run.ts"+ "start": "ts-node src/run.ts",+ "prepublish": "ts-node src/admin/bundle-lambda.ts && node ensure-version-match.js"},"author": "","license": "MIT",