Skip to content

Commit

Permalink
fix: 修改脚本
Browse files Browse the repository at this point in the history
  • Loading branch information
galaxy-s10 committed Sep 28, 2022
1 parent 1bb953a commit 8a7d96f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
8 changes: 5 additions & 3 deletions scripts/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ const {
chalkINFO,
} = require('../build-tools/utils/chalkTip');

// 如果进程超时或有非零退出代码,execSync将抛出Error 对象
execSync(`git push origin v${pkg.version}`, { stdio: 'inherit' });
execSync(`git push`, { stdio: 'inherit' });

const packages = fs.readdirSync(path.resolve(__dirname, '../packages/'));
packages.forEach((res) => {
const stat = fs.statSync(`${path.resolve(__dirname, '../packages/')}/${res}`);
Expand All @@ -16,9 +20,7 @@ packages.forEach((res) => {
console.log(
chalkINFO(`开始发布线上@huangshuisheng/${res}@${pkg.version}...`)
);
// 如果进程超时或有非零退出代码,execSync将抛出Error 对象
execSync(`git push origin v${pkg.version}`, { stdio: 'inherit' });
execSync(`git push`, { stdio: 'inherit' });

execSync('npm publish --access public', {
stdio: 'inherit',
cwd: path.resolve(__dirname, '../packages', res, 'dist'),
Expand Down
3 changes: 3 additions & 0 deletions scripts/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ const selectReleaseVersion = async () => {
// 更新package.json
updatePackageJSON();

execSync(`npm run compile:svg`, { stdio: 'inherit' });
execSync(`npm run compile:vue`, { stdio: 'inherit' });

// 生成changelog
execSync(`npm run changelog`, { stdio: 'inherit' });

Expand Down

0 comments on commit 8a7d96f

Please sign in to comment.