Skip to content

Commit

Permalink
build: 修改git commit逻辑
Browse files Browse the repository at this point in the history
  • Loading branch information
simply-none committed Apr 30, 2024
1 parent 8c13df2 commit 52be500
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
8 changes: 0 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,7 @@
"husky": "^8.0.3",
"inquirer": "^8.2.5",
"moment": "^2.30.1",
"standard-version": "^9.5.0",
"vitepress": "1.0.0",
"vue-router": "^4.2.2"
},
"standard-version": {
"skip": {
"changelog": true,
"tag": false,
"commit": true
}
}
}
8 changes: 4 additions & 4 deletions utils/gitCommit.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ const updatedVersion = require("./updatedVersion").updatedVersion
// 先获取下个 版本号
const nextVersion = generateVersion(pkg.version)

// 更新项目的版本号
updatedVersion(pkg.version)

// 提交代码
let gitAddMsg = shell.exec('git add .')
if (gitAddMsg.code !== 0) {
console.error(gitAddMsg.stderr)
}

// 更新项目的版本号
updatedVersion(pkg.version)

// 提交代码
let gitCommitMsg = shell.exec(`git commit -m "chore(release): ${nextVersion}"`)
if (gitCommitMsg.code !== 0) {
console.error(gitCommitMsg.stderr)
Expand Down

0 comments on commit 52be500

Please sign in to comment.