mirror of
https://github.com/cypress-io/cypress.git
synced 2026-01-06 06:29:45 -06:00
chore: install specific Node version on Mac before building binary (#8242)
This commit is contained in:
@@ -3,23 +3,10 @@ const assert = require('assert')
|
||||
|
||||
// TODO make this check a 3rd party little tool
|
||||
|
||||
// on CircleCI Mac machine, we need to use on of the laer executors
|
||||
// that already has Node 10 / 11
|
||||
const isMac = () => {
|
||||
return os.platform() === 'darwin'
|
||||
}
|
||||
|
||||
const isWindows = () => {
|
||||
return os.platform() === 'win32'
|
||||
}
|
||||
|
||||
if (isMac() && process.env.CIRCLECI) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('Skipping Node version check on CircleCI Mac')
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// if we're windows + in appveyor...
|
||||
if (isWindows() && process.env.APPVEYOR) {
|
||||
// check to ensure that the cpuArch + nodeArch are in sync
|
||||
|
||||
11
scripts/load-nvm.sh
Executable file
11
scripts/load-nvm.sh
Executable file
@@ -0,0 +1,11 @@
|
||||
# loads previously installed NVM
|
||||
# USE:
|
||||
# - run:
|
||||
# name: check Node version
|
||||
# command: |
|
||||
# . ./scripts/load-nvm.sh
|
||||
# yarn check-node-version
|
||||
|
||||
export NVM_DIR="$HOME/.nvm"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
|
||||
export NODE_VERSION=$(cat .node-version)
|
||||
Reference in New Issue
Block a user