From b85b9a4bd16ab7908ad9bb09e83d518eb7cad0ff Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Mon, 22 Aug 2022 08:01:10 -0500 Subject: [PATCH] Leverage VERCEL_CLI_VERSION env for deploy tests --- test/lib/next-modes/next-deploy.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/test/lib/next-modes/next-deploy.ts b/test/lib/next-modes/next-deploy.ts index 2264014aacb..a06c85f5146 100644 --- a/test/lib/next-modes/next-deploy.ts +++ b/test/lib/next-modes/next-deploy.ts @@ -74,6 +74,13 @@ export class NextDeployInstance extends NextInstance { additionalEnv.push(`${key}=${this.env[key]}`) } + if (process.env.VERCEL_CLI_VERSION) { + additionalEnv.push('--build-env') + additionalEnv.push( + `VERCEL_CLI_VERSION="${process.env.VERCEL_CLI_VERSION}"` + ) + } + const deployRes = await execa( 'vercel', [ @@ -81,8 +88,6 @@ export class NextDeployInstance extends NextInstance { '--build-env', 'NEXT_PRIVATE_TEST_MODE=1', '--build-env', - 'FORCE_RUNTIME_TAG=canary', - '--build-env', 'NEXT_TELEMETRY_DISABLED=1', ...additionalEnv, '--force',