5.0.0 • Published 2 years ago

@daniel-dx/study-publish v5.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

模块发布

自动修改版本号 npm version

假设 package.json 中的 version 为 1.0.0

  • npm version major

相当于:1)把 version 改为 2.0.0;2) git commit -am "2.0.0" && git tag v2.0.0

  • npm version minor

相当于:1)把 version 改为 1.1.0;2) git commit -am "1.1.0" && git tag v1.1.0

  • npm version patch

相当于:1)把 version 改为 1.0.1;2) git commit -am "1.0.1" && git tag v1.0.1

  • npm version premajor --preid 'demo'

相当于:1)把 version 改为 2.0.0-demo.0;2) git commit -am "2.0.0-demo.0" && git tag v2.0.0-demo.0

  • npm version preminor --preid 'test'

相当于:1)把 version 改为 1.1.0-test.0;2) git commit -am "1.1.0-test.0" && git tag v1.1.0-test.0

  • npm version prepatch --preid 'beta'

相当于:1)把 version 改为 1.0.1-beta.0;2) git commit -am "1.0.1-beta.0" && git tag v1.0.1-beta.0

  • npm version prerelease --preid 'alpha'

相当于:1)把 version 改为 1.0.0-alpha.0;2) git commit -am "1.0.0-alpha.0" && git tag v1.0.0-alpha.0

每次发布修改的是 alpha 后面的数据

删除所有本地 tag

$ git tag | xargs git tag -d