Skip to content

🎥 Make videos programmatically with React

added region function to output available gcp regions

Matt McGillivrayfead5ee43d83
diff --git a/packages/gcp/src/cli/commands/regions.ts b/packages/gcp/src/cli/commands/regions.ts
new file mode 100644
index 0000000000..72a3d6905e
--- /dev/null
+++ b/packages/gcp/src/cli/commands/regions.ts
@@ -0,0 +1,8 @@
+import {CliInternals} from '@remotion/cli';
+import {GCP_REGIONS} from '../../regions';
+
+export const REGIONS_COMMAND = 'regions';
+
+export const regionsCommand = () => {
+ CliInternals.Log.info(GCP_REGIONS.join(' '));
+};
diff --git a/packages/gcp/src/cli/index.ts b/packages/gcp/src/cli/index.ts
index 876e5fb991..bd3c62804e 100644
--- a/packages/gcp/src/cli/index.ts
+++ b/packages/gcp/src/cli/index.ts
@@ -4,6 +4,7 @@ import {
compositionsCommand,
COMPOSITIONS_COMMAND,
} from './commands/compositions';
+import {regionsCommand, REGIONS_COMMAND} from './commands/regions';
import {renderCommand, RENDER_COMMAND} from './commands/render';
import {sitesCommand, SITES_COMMAND} from './commands/sites';
import {printHelp} from './help';
@@ -32,6 +33,10 @@ const matchCommand = (args: string[], remotionRoot: string) => {
return compositionsCommand(args.slice(1));
}
+ if (args[0] === REGIONS_COMMAND) {
+ return regionsCommand();
+ }
+
if (args[0] === 'deploy') {
Log.info(`The "deploy" command does not exist.`);
Log.info(`Did you mean "cloud-run deploy"?`);