Skip to content

Commit e448de6

Browse files
committed
cosmetic
1 parent a9c71a3 commit e448de6

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

npm-scripts.mjs

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,7 @@ async function run() {
102102
}
103103

104104
case 'release': {
105-
checkRelease();
106-
executeCmd(`git commit -am '${pkg.version}'`);
107-
executeCmd(`git tag -a ${pkg.version} -m '${pkg.version}'`);
108-
executeCmd(`git push origin ${RELEASE_BRANCH}`);
109-
executeCmd(`git push origin '${pkg.version}'`);
110-
executeInteractiveCmd('npm publish');
105+
release();
111106

112107
break;
113108
}
@@ -199,6 +194,17 @@ function checkRelease() {
199194
test();
200195
}
201196

197+
function release() {
198+
logInfo('release()');
199+
200+
checkRelease();
201+
executeCmd(`git commit -am '${pkg.version}'`);
202+
executeCmd(`git tag -a ${pkg.version} -m '${pkg.version}'`);
203+
executeCmd(`git push origin ${RELEASE_BRANCH}`);
204+
executeCmd(`git push origin '${pkg.version}'`);
205+
executeInteractiveCmd('npm publish');
206+
}
207+
202208
function executeCmd(command) {
203209
logInfo(`executeCmd(): ${command}`);
204210

0 commit comments

Comments
 (0)