Unverified Commit 9439d271 authored by JJ Kasper's avatar JJ Kasper Committed by GitHub

Skip next-swc canary postinstall in CI (#30916)

* Skip next-swc canary postinstall in CI

* lint-fix
parent 19a61586
...@@ -21,6 +21,9 @@ jobs: ...@@ -21,6 +21,9 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
env: env:
NEXT_TELEMETRY_DISABLED: 1 NEXT_TELEMETRY_DISABLED: 1
# we build a dev binary for use in CI so skip downloading
# canary next-swc binaries in the monorepo
NEXT_SKIP_NATIVE_POSTINSTALL: 1
outputs: outputs:
docsChange: ${{ steps.docs-change.outputs.DOCS_CHANGE }} docsChange: ${{ steps.docs-change.outputs.DOCS_CHANGE }}
isRelease: ${{ steps.check-release.outputs.IS_RELEASE }} isRelease: ${{ steps.check-release.outputs.IS_RELEASE }}
......
...@@ -3,6 +3,13 @@ import path from 'path' ...@@ -3,6 +3,13 @@ import path from 'path'
import execa from 'execa' import execa from 'execa'
import fs from 'fs-extra' import fs from 'fs-extra'
;(async function () { ;(async function () {
if (process.env.NEXT_SKIP_NATIVE_POSTINSTALL) {
console.log(
`Skipping next-swc postinstall due to NEXT_SKIP_NATIVE_POSTINSTALL env`
)
return
}
try { try {
let tmpdir = path.join(os.tmpdir(), `next-swc-${Date.now()}`) let tmpdir = path.join(os.tmpdir(), `next-swc-${Date.now()}`)
await fs.ensureDir(tmpdir) await fs.ensureDir(tmpdir)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment