Skip to content

Commit

Permalink
fix: 取消check-git入参
Browse files Browse the repository at this point in the history
  • Loading branch information
StreakingMan committed Feb 22, 2022
1 parent 473d166 commit 795f679
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
10 changes: 3 additions & 7 deletions actions/check-git.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
const {execSync} = require('child_process')
const checkGit = (propName) => {
if (!propName || propName === 'username') {
console.log(`git config user.name ${execSync('git config user.name')}`)
}
if (!propName || propName === 'email') {
console.log(`git config user.email ${execSync('git config user.email')}`)
}
const checkGit = () => {
console.log(`git config user.name ${execSync('git config user.name')}`)
console.log(`git config user.email ${execSync('git config user.email')}`)
}

module.exports = {
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ program.version(`${CLINAME}@${version}`, '-v')
.usage('<command> [options]')
.name(CLINAME)

program.command('check-git <propName>')
program.command('check-git')
.description('查看当前git配置用户名和邮箱')
.action(checkGit)

Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"release": "standard-version",
"release&publish": "npm run release && npm publish"
"release:alpha": "standard-version -- --prerelease alpha",
"release&publish": "npm run release && npm publish",
"release:alpah&publish": "npm run release:alpha && npm publish"
},
"author": "",
"license": "ISC",
Expand Down

0 comments on commit 795f679

Please sign in to comment.