make script errors fatal

This commit is contained in:
Eugene Pankov
2022-01-16 19:41:01 +01:00
parent 782128308c
commit 64410a9302
6 changed files with 29 additions and 34 deletions

View File

@@ -1,30 +1,26 @@
#!/usr/bin/env node
const sh = require('shelljs')
const path = require('path')
const vars = require('./vars')
const log = require('npmlog')
const localBinPath = path.resolve(__dirname, '../node_modules/.bin')
const npx = `${localBinPath}/npx`
log.info('patch')
sh.exec(`${npx} patch-package`)
sh.exec(`yarn patch-package`, { fatal: true })
log.info('deps', 'app')
sh.cd('app')
sh.exec(`${npx} yarn install --force`)
sh.exec(`yarn yarn install --force`, { fatal: true })
sh.cd('..')
sh.cd('web')
sh.exec(`${npx} yarn install --force`)
sh.exec(`${npx} patch-package`)
sh.exec(`yarn yarn install --force`, { fatal: true })
sh.exec(`yarn patch-package`, { fatal: true })
sh.cd('..')
vars.allPackages.forEach(plugin => {
log.info('deps', plugin)
sh.cd(plugin)
sh.exec(`${npx} yarn install --force`)
sh.exec(`yarn install --force`, { fatal: true })
sh.cd('..')
})