🎥 Make videos programmatically with React
go version
Jonny Burgerf1d00218cd44
diff --git a/packages/goclient-example/main.go b/packages/goclient-example/main.goindex d1d6f4b37f..6ffd5d5d4b 100644--- a/packages/goclient-example/main.go+++ b/packages/goclient-example/main.go@@ -5,9 +5,10 @@ import ("log""os"+ "goclient"+"github.com/go-playground/validator/v10""github.com/joho/godotenv"- "github.com/remotion-dev/remotion/packages/goclient")type ValidationError struct {diff --git a/packages/goclient/goclient_test.go b/packages/goclient/goclient_test.gonew file mode 100644index 0000000000..a586782635--- /dev/null+++ b/packages/goclient/goclient_test.go@@ -0,0 +1,26 @@+package goclient++import (+ "encoding/json"+ "log"+ "testing"+)++func TestPrintVersion(t *testing.T) {+ payload, err := constructRenderInternals(&RemotionOptions{+ Region: "us-east-1",+ Composition: "react-svg",+ FunctionName: "remotion-render",+ ServeUrl: "testbed",+ })+ if err != nil {+ log.Fatalf("Error marshaling struct to JSON: %v", err)+ }++ jsonData, err := json.Marshal(payload)+ if err != nil {+ log.Fatalf("Error marshaling struct to JSON: %v", err)+ }++ println(string(jsonData))+}diff --git a/packages/goclient/internalops.go b/packages/goclient/internalops.goindex 1f056b5151..2453649de2 100644--- a/packages/goclient/internalops.go+++ b/packages/goclient/internalops.go@@ -26,7 +26,7 @@ func constructRenderInternals(options *RemotionOptions) (*renderInternalOptions,Composition: options.Composition,Region: options.Region,Type: "start",- Version: options.Version,+ Version: VERSION,FrameRange: options.FrameRange,OutName: options.OutName,AudioBitrate: options.AudioBitrate,diff --git a/packages/goclient/version.go b/packages/goclient/version.gonew file mode 100644index 0000000000..5ecb8645d4--- /dev/null+++ b/packages/goclient/version.go@@ -0,0 +1,3 @@+package goclient++const VERSION = "3.3.88"diff --git a/packages/it-tests/src/monorepo/go-package.test.ts b/packages/it-tests/src/monorepo/go-package.test.tsnew file mode 100644index 0000000000..758b540056--- /dev/null+++ b/packages/it-tests/src/monorepo/go-package.test.ts@@ -0,0 +1,20 @@+import { readFileSync, writeFileSync } from "fs";+import path from "path";+import { expect, test } from "vitest";++test("Set the right version for gotest", () => {+ const referenceVersion = readFileSync(+ path.join(process.cwd(), "..", "core", "package.json"),+ "utf-8"+ );++ const referenceVersionJson = JSON.parse(referenceVersion);+ const version = referenceVersionJson.version;+ expect(typeof version).toBe("string");++ const VERSION = `const VERSION = "${version}"`;+ writeFileSync(+ path.join(process.cwd(), "..", "goclient", "version.go"),+ VERSION+ );+});