Skip to content

🎥 Make videos programmatically with React

Fix Go SDK

Jonny Burgerea4660361a16
diff --git a/packages/docs/docs/lambda/go.md b/packages/docs/docs/lambda/go.md
index 1cf73e2757..5b87b46286 100644
--- a/packages/docs/docs/lambda/go.md
+++ b/packages/docs/docs/lambda/go.md
@@ -27,7 +27,7 @@ import (
"github.com/go-playground/validator/v10"
"github.com/joho/godotenv"
// Match the version with the version of your deployed functions
- "github.com/remotion-dev/remotion/packages/lambda-go/v3.3.89"
+ "github.com/remotion-dev/lambda-go-sdk/v3.3.98"
)
type ValidationError struct {
diff --git a/packages/lambda-go/package.json b/packages/lambda-go/package.json
index e653a98567..065c03e75b 100644
--- a/packages/lambda-go/package.json
+++ b/packages/lambda-go/package.json
@@ -4,5 +4,8 @@
"version": "3.3.97",
"scripts": {
"lint": "node build.mjs"
+ },
+ "devDependencies": {
+ "remotion": "workspace:*"
}
}
diff --git a/packages/lambda-go/publish.mjs b/packages/lambda-go/publish.mjs
new file mode 100644
index 0000000000..c128965242
--- /dev/null
+++ b/packages/lambda-go/publish.mjs
@@ -0,0 +1,59 @@
+import { VERSION } from "remotion/version";
+import { execSync } from "node:child_process";
+import {
+ copyFileSync,
+ mkdirSync,
+ cpSync,
+ existsSync,
+ rmSync,
+ writeFileSync,
+ readdirSync,
+} from "node:fs";
+import { tmpdir } from "node:os";
+import path from "node:path";
+
+const tmpDir = tmpdir();
+
+const workingDir = path.join(tmpDir, "lambda-go-sdk");
+if (existsSync(workingDir)) {
+ rmSync(workingDir, { recursive: true });
+}
+mkdirSync(workingDir);
+console.log(tmpDir);
+
+execSync(
+ `git clone [email protected]:remotion-dev/lambda-go-sdk.git ${workingDir}`,
+ {
+ cwd: tmpDir,
+ }
+);
+
+const dir = readdirSync(".");
+for (const file of dir) {
+ if (file.endsWith(".go") && !file.endsWith("_test.go")) {
+ copyFileSync(file, path.join(workingDir, file));
+ }
+}
+
+copyFileSync("go.mod", path.join(workingDir, "go.mod"));
+copyFileSync("go.sum", path.join(workingDir, "go.sum"));
+
+writeFileSync(
+ path.join(workingDir, "README.md"),
+ [
+ "# Remotion Lambda Go SDK",
+ "This repository exists because the Go SDK must be in a separate 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/go to learn how to install the Remotion Lambda Go SDK.",
+ ].join("\n")
+);
+execSync("git add .", { cwd: workingDir });
+execSync(`git commit -m 'Release ${VERSION}'`, { 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 aec99af55f..b47a7ee410 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -762,7 +762,10 @@ importers:
zip-lib: 0.7.2
packages/lambda-go:
- specifiers: {}
+ specifiers:
+ remotion: workspace:*
+ devDependencies:
+ remotion: link:../core
packages/lambda-go-example:
specifiers: {}
@@ -773,6 +776,12 @@ importers:
devDependencies:
remotion: link:../core
+ packages/lambda-php-example/vendor/remotion/lambda:
+ specifiers:
+ remotion: workspace:*
+ devDependencies:
+ remotion: link:../../../../core
+
packages/lottie:
specifiers:
'@jonny/eslint-config': 3.0.266