Skip to content

Commit

Permalink
Skip next-swc canary postinstall in CI (vercel#30916)
Browse files Browse the repository at this point in the history
* Skip next-swc canary postinstall in CI

* lint-fix
  • Loading branch information
ijjk authored Nov 3, 2021
1 parent 19a6158 commit 9439d27
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build_test_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ jobs:
runs-on: ubuntu-latest
env:
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:
docsChange: ${{ steps.docs-change.outputs.DOCS_CHANGE }}
isRelease: ${{ steps.check-release.outputs.IS_RELEASE }}
Expand Down
7 changes: 7 additions & 0 deletions scripts/install-native.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ import path from 'path'
import execa from 'execa'
import fs from 'fs-extra'
;(async function () {
if (process.env.NEXT_SKIP_NATIVE_POSTINSTALL) {
console.log(
`Skipping next-swc postinstall due to NEXT_SKIP_NATIVE_POSTINSTALL env`
)
return
}

try {
let tmpdir = path.join(os.tmpdir(), `next-swc-${Date.now()}`)
await fs.ensureDir(tmpdir)
Expand Down

0 comments on commit 9439d27

Please sign in to comment.