From b431bd4ba05d63c8b8a8b62c4efd085a8a8f21f2 Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Mon, 22 Aug 2022 09:54:25 -0500 Subject: [PATCH] Leverage VERCEL_CLI_VERSION env for deploy tests (#39823) This updates our next-e2e test deploy mode to auto pass along the VERCEL_CLI_VERSION env variable to allow testing builder changes easier. cc @nkzawa who encountered this. --- 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',