Skip to content

Commit

Permalink
Leverage VERCEL_CLI_VERSION env for deploy tests (#39823)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ijjk committed Aug 22, 2022
1 parent c172d46 commit b431bd4
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions test/lib/next-modes/next-deploy.ts
Expand Up @@ -74,15 +74,20 @@ 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',
[
'deploy',
'--build-env',
'NEXT_PRIVATE_TEST_MODE=1',
'--build-env',
'FORCE_RUNTIME_TAG=canary',
'--build-env',
'NEXT_TELEMETRY_DISABLED=1',
...additionalEnv,
'--force',
Expand Down

0 comments on commit b431bd4

Please sign in to comment.