mirror of
https://github.com/Eugeny/tabby.git
synced 2024-11-29 09:18:26 +03:00
make script errors fatal
This commit is contained in:
parent
782128308c
commit
64410a9302
@ -5,5 +5,5 @@ const log = require('npmlog')
|
||||
|
||||
vars.packagesWithDocs.forEach(([dest, src]) => {
|
||||
log.info('docs', src)
|
||||
sh.exec(`yarn typedoc --out docs/api/${dest} --tsconfig ${src}/tsconfig.typings.json ${src}/src/index.ts`)
|
||||
sh.exec(`yarn typedoc --out docs/api/${dest} --tsconfig ${src}/tsconfig.typings.json ${src}/src/index.ts`, { fatal: true })
|
||||
})
|
||||
|
@ -5,5 +5,5 @@ const log = require('npmlog')
|
||||
|
||||
vars.builtinPlugins.forEach(plugin => {
|
||||
log.info('typings', plugin)
|
||||
sh.exec(`npx tsc --project ${plugin}/tsconfig.typings.json`)
|
||||
sh.exec(`yarn tsc --project ${plugin}/tsconfig.typings.json`, { fatal: true })
|
||||
})
|
||||
|
@ -13,15 +13,14 @@ const tempHtml = 'locale/tmp-html'
|
||||
for (const plugin of vars.builtinPlugins) {
|
||||
log.info('extract-pug', plugin)
|
||||
|
||||
sh.exec(`yarn pug --doctype html -s --pretty -O '{require: function(){}}' -o ${tempHtml}/${plugin} ${plugin}`)
|
||||
sh.exec(`yarn pug --doctype html -s --pretty -O '{require: function(){}}' -o ${tempHtml}/${plugin} ${plugin}`, { fatal: true })
|
||||
|
||||
log.info('extract-ts', plugin)
|
||||
sh.exec(`node node_modules/.bin/ngx-translate-extract -i ${plugin}/src -m -s -f pot -o ${tempOutput}`)
|
||||
|
||||
sh.exec(`node node_modules/.bin/ngx-translate-extract -i ${plugin}/src -m -s -f pot -o ${tempOutput}`, { fatal: true })
|
||||
}
|
||||
|
||||
log.info('extract-pug')
|
||||
sh.exec(`node node_modules/.bin/ngx-translate-extract -i ${tempHtml} -f pot -s -o ${tempOutput}`)
|
||||
sh.exec(`node node_modules/.bin/ngx-translate-extract -i ${tempHtml} -f pot -s -o ${tempOutput}`, { fatal: true })
|
||||
|
||||
sh.rm('-r', tempHtml)
|
||||
await fs.rename(tempOutput, pot)
|
||||
|
@ -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('..')
|
||||
})
|
||||
|
||||
|
@ -11,25 +11,25 @@ sh.mkdir('-p', target)
|
||||
fs.writeFileSync(path.join(target, 'package.json'), '{}')
|
||||
sh.cd(target)
|
||||
vars.builtinPlugins.forEach(plugin => {
|
||||
if (plugin === 'tabby-web') {
|
||||
return
|
||||
}
|
||||
log.info('install', plugin)
|
||||
sh.cp('-r', path.join('..', plugin), '.')
|
||||
sh.rm('-rf', path.join(plugin, 'node_modules'))
|
||||
sh.cd(plugin)
|
||||
sh.exec(`yarn install --force --production`)
|
||||
if (plugin === 'tabby-web') {
|
||||
return
|
||||
}
|
||||
log.info('install', plugin)
|
||||
sh.cp('-r', path.join('..', plugin), '.')
|
||||
sh.rm('-rf', path.join(plugin, 'node_modules'))
|
||||
sh.cd(plugin)
|
||||
sh.exec(`yarn install --force --production`, { fatal: true })
|
||||
|
||||
|
||||
log.info('rebuild', 'native')
|
||||
if (fs.existsSync('node_modules')) {
|
||||
rebuild({
|
||||
buildPath: path.resolve('.'),
|
||||
electronVersion: vars.electronVersion,
|
||||
arch: process.env.ARCH ?? process.arch,
|
||||
force: true,
|
||||
})
|
||||
}
|
||||
sh.cd('..')
|
||||
log.info('rebuild', 'native')
|
||||
if (fs.existsSync('node_modules')) {
|
||||
rebuild({
|
||||
buildPath: path.resolve('.'),
|
||||
electronVersion: vars.electronVersion,
|
||||
arch: process.env.ARCH ?? process.arch,
|
||||
force: true,
|
||||
})
|
||||
}
|
||||
sh.cd('..')
|
||||
})
|
||||
fs.unlinkSync(path.join(target, 'package.json'), '{}')
|
||||
|
@ -7,7 +7,7 @@ const { execSync } = require('child_process')
|
||||
vars.allPackages.forEach(plugin => {
|
||||
log.info('bump', plugin)
|
||||
sh.cd(plugin)
|
||||
sh.exec('npm --no-git-tag-version version ' + vars.version)
|
||||
sh.exec('npm --no-git-tag-version version ' + vars.version, { fatal: true })
|
||||
execSync('npm publish', { stdio: 'inherit' })
|
||||
sh.cd('..')
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user