Commit a6a0d12c authored by 杨思琦's avatar 杨思琦

feat: 发布包更新

parent 1e5a321b
Pipeline #61169 waiting for manual action with stages
......@@ -10,10 +10,24 @@ before_script:
- 'git config core.autocrlf false'
stages:
- refresh
- install
- package
- push
refresh:
stage: refresh
tags:
- civ_base
script:
- git pull origin master
- npm run refresh
only:
refs:
- master
variables:
- $NPM_INSTALL == "true"
when: manual
install:
stage: install
......
const rm = require('rimraf');
const path = require('path');
const webpack = require('webpack');
const chalk = require('chalk');
const ora = require('ora')
const ora = require('ora');
const pkg = require('../../package.json');
const webpackConfig = require('./webpack.prod.babel')
const webpackConfig = require('./webpack.prod.babel');
const argv = require('../../server/argv');
const spinner = ora('building for production...');
const { printFileSizes } = require('./buildDevUtil');
......
const { execSync } = require('child_process');
const fs = require('fs');
const path = require('path');
function findFile(dir, findStr) {
if (!fs.existsSync(dir)) return false;
fs.readdirSync(dir).forEach(fileName => {
findStr.forEach(module => {
if (fileName.indexOf(module.dir) !== -1) {
module.component.forEach(compo => {
execSync(`npm uninstall ${compo}`);
execSync(`npm install ${compo}`);
});
}
});
});
}
findFile(path.resolve(process.cwd(), 'node_modules'), [
{ dir: '@wisdom-utils', component: ['@wisdom-utils/components', '@wisdom-utils/runtime', '@wisdom-utils/utils'] },
]);
......@@ -19,6 +19,7 @@
"analyze": "cross-env ANALYZE=1 npm run build",
"npmcheckversion": "node ./internals/scripts/npmcheckversion.js",
"preinstall": "yarn run npmcheckversion && npx force-resolutions",
"refresh": "node ./internals/webpack/install.js --registry=https://g.civnet.cn:4873",
"build": "cross-env NODE_ENV=production node --max_old_space_size=4096 internals/webpack/build.js",
"build:clean": "rimraf ./build",
"openapi": "cross-env NODE_ENV=development yarn server/openapi/run.js",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment