mirror of
https://github.com/Eugeny/tabby.git
synced 2025-07-06 19:39:53 +00: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]) => {
|
vars.packagesWithDocs.forEach(([dest, src]) => {
|
||||||
log.info('docs', 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 => {
|
vars.builtinPlugins.forEach(plugin => {
|
||||||
log.info('typings', 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) {
|
for (const plugin of vars.builtinPlugins) {
|
||||||
log.info('extract-pug', plugin)
|
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)
|
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')
|
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)
|
sh.rm('-r', tempHtml)
|
||||||
await fs.rename(tempOutput, pot)
|
await fs.rename(tempOutput, pot)
|
||||||
|
@ -1,30 +1,26 @@
|
|||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
const sh = require('shelljs')
|
const sh = require('shelljs')
|
||||||
const path = require('path')
|
|
||||||
const vars = require('./vars')
|
const vars = require('./vars')
|
||||||
const log = require('npmlog')
|
const log = require('npmlog')
|
||||||
|
|
||||||
const localBinPath = path.resolve(__dirname, '../node_modules/.bin')
|
|
||||||
const npx = `${localBinPath}/npx`
|
|
||||||
|
|
||||||
log.info('patch')
|
log.info('patch')
|
||||||
sh.exec(`${npx} patch-package`)
|
sh.exec(`yarn patch-package`, { fatal: true })
|
||||||
|
|
||||||
log.info('deps', 'app')
|
log.info('deps', 'app')
|
||||||
|
|
||||||
sh.cd('app')
|
sh.cd('app')
|
||||||
sh.exec(`${npx} yarn install --force`)
|
sh.exec(`yarn yarn install --force`, { fatal: true })
|
||||||
sh.cd('..')
|
sh.cd('..')
|
||||||
|
|
||||||
sh.cd('web')
|
sh.cd('web')
|
||||||
sh.exec(`${npx} yarn install --force`)
|
sh.exec(`yarn yarn install --force`, { fatal: true })
|
||||||
sh.exec(`${npx} patch-package`)
|
sh.exec(`yarn patch-package`, { fatal: true })
|
||||||
sh.cd('..')
|
sh.cd('..')
|
||||||
|
|
||||||
vars.allPackages.forEach(plugin => {
|
vars.allPackages.forEach(plugin => {
|
||||||
log.info('deps', plugin)
|
log.info('deps', plugin)
|
||||||
sh.cd(plugin)
|
sh.cd(plugin)
|
||||||
sh.exec(`${npx} yarn install --force`)
|
sh.exec(`yarn install --force`, { fatal: true })
|
||||||
sh.cd('..')
|
sh.cd('..')
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ vars.builtinPlugins.forEach(plugin => {
|
|||||||
sh.cp('-r', path.join('..', plugin), '.')
|
sh.cp('-r', path.join('..', plugin), '.')
|
||||||
sh.rm('-rf', path.join(plugin, 'node_modules'))
|
sh.rm('-rf', path.join(plugin, 'node_modules'))
|
||||||
sh.cd(plugin)
|
sh.cd(plugin)
|
||||||
sh.exec(`yarn install --force --production`)
|
sh.exec(`yarn install --force --production`, { fatal: true })
|
||||||
|
|
||||||
|
|
||||||
log.info('rebuild', 'native')
|
log.info('rebuild', 'native')
|
||||||
|
@ -7,7 +7,7 @@ const { execSync } = require('child_process')
|
|||||||
vars.allPackages.forEach(plugin => {
|
vars.allPackages.forEach(plugin => {
|
||||||
log.info('bump', plugin)
|
log.info('bump', plugin)
|
||||||
sh.cd(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' })
|
execSync('npm publish', { stdio: 'inherit' })
|
||||||
sh.cd('..')
|
sh.cd('..')
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user