Skip to content

🎥 Make videos programmatically with React

publish scripts

Jonny Burgerda1dbed67497
diff --git a/packages/lambda-php/package.json b/packages/lambda-php/package.json
index fb0100ec2f..5decdb63b1 100644
--- a/packages/lambda-php/package.json
+++ b/packages/lambda-php/package.json
@@ -3,6 +3,10 @@
"private": true,
"version": "3.3.95",
"scripts": {
- "lint": "node build.mjs"
+ "lint": "node build.mjs",
+ "publish": "node publish.mjs"
+ },
+ "devDependencies": {
+ "remotion": "workspace:*"
}
}
diff --git a/packages/lambda-php/publish.mjs b/packages/lambda-php/publish.mjs
new file mode 100644
index 0000000000..28c6b60d92
--- /dev/null
+++ b/packages/lambda-php/publish.mjs
@@ -0,0 +1,51 @@
+import { VERSION } from "remotion/version";
+import { execSync } from "node:child_process";
+import {
+ copyFileSync,
+ mkdirSync,
+ cpSync,
+ existsSync,
+ rmSync,
+ writeFileSync,
+} from "node:fs";
+import { tmpdir } from "node:os";
+import path from "node:path";
+
+const tmpDir = tmpdir();
+
+const workingDir = path.join(tmpDir, "lambda-php-sdk");
+if (existsSync(workingDir)) {
+ rmSync(workingDir, { recursive: true });
+}
+mkdirSync(workingDir);
+console.log(tmpDir);
+
+execSync(
+ `git clone [email protected]:remotion-dev/lambda-php-sdk.git ${workingDir}`,
+ {
+ cwd: tmpDir,
+ }
+);
+
+copyFileSync("composer.json", path.join(workingDir, "composer.json"));
+copyFileSync("composer.lock", path.join(workingDir, "composer.lock"));
+cpSync("src", path.join(workingDir, "src"), { recursive: true });
+writeFileSync(
+ path.join(workingDir, "README.md"),
+ [
+ "# Remotion Lambda PHP SDK",
+ "This repository exists because Composer packages need to have a composer.json file placed in the root of the repository.",
+ "The actual source code is located in the [Remotion repository](https://remotion.dev/github).",
+ "This repository is automatically updated when a new version of Remotion is released.",
+ "Do not open issues or pull requests here.",
+ "",
+ "## Installation",
+ "Visit https://www.remotion.dev/docs/lambda/php to learn how to install the Remotion Lambda PHP SDK.",
+ ].join("\n")
+);
+execSync("git add .", { cwd: workingDir });
+execSync("git commit -m 'Update'", { cwd: workingDir });
+execSync(`git tag ${VERSION}`, { cwd: workingDir });
+execSync("git push", { cwd: workingDir });
+execSync(`git push origin ${VERSION}`, { cwd: workingDir });
+execSync("git push --tags", { cwd: workingDir });
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 4ba482893d..41b03436be 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -767,6 +767,12 @@ importers:
packages/lambda-go-example:
specifiers: {}
+ packages/lambda-php:
+ specifiers:
+ remotion: workspace:*
+ devDependencies:
+ remotion: link:../core
+
packages/lottie:
specifiers:
'@jonny/eslint-config': 3.0.266