// const commitId = (() => require('child_process').execSync(`git rev-parse HEAD`).toString().trim())();

const fs = require(`fs`)
const package = require(`./package.json`)
const newVersion = package.version.replace(/(.*)(\d+$)/, ($0, $1, $2) => $1+(+$2+1))
package.version = newVersion
fs.writeFileSync(`./package.json`, JSON.stringify(package, null, 2))

相关文章:

  • 2021-08-13
  • 2021-10-05
  • 2022-12-23
  • 2021-05-16
  • 2022-12-23
猜你喜欢
  • 2021-12-27
  • 2022-12-23
  • 2021-09-02
  • 2021-09-01
  • 2022-12-23
  • 2021-10-23
相关资源
相似解决方案