Skip to content

Commit a379a79

Browse files
author
雅影
committed
fix: delete useless code
1 parent b194d8f commit a379a79

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/built-in-plugins/command-build/plugin/build.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ export const buildComponent = async (packageInfo: PackageInfo = null) => {
113113
// );
114114

115115
// TODO:
116-
await spinner(`build source files ${(packageInfo && packageInfo.name) || ''}`, async () => {
116+
await spinner(`build source files ${(packageInfo && packageInfo.name) || ''} \n`, async () => {
117117
await tsPlusBabel(false, false, packageInfo);
118118
});
119119

src/built-in-plugins/command-publish/plugin/run-publish.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import * as fs from 'fs-extra';
22
import * as path from 'path';
33
import * as inquirer from 'inquirer';
4-
import { execSync } from 'child_process';
54
import * as _ from 'lodash';
65
import { PublishOption } from './interface';
76
import { exec } from '../../../utils/exec';
@@ -79,10 +78,7 @@ export const publish = async (options: PublishOption) => {
7978

8079
await fs.remove(path.join(pri.projectRootPath, tempPath.dir, declarationPath.dir));
8180

82-
const currentBranch = execSync('git rev-parse --abbrev-ref HEAD')
83-
.toString('utf8')
84-
.trim();
85-
await exec(`git push origin ${currentBranch}`);
81+
await exec(`git push origin ${currentBranchName}`);
8682
}
8783
break;
8884
}

0 commit comments

Comments
 (0)