atlassian / lerna-semantic-release

📦:🛠✨💥 – fully automated package publishing
https://www.npmjs.com/package/lerna-semantic-release
683 stars 42 forks source link

Correct way to control version? #80

Open phuo1032 opened 7 years ago

phuo1032 commented 7 years ago

Hi,

What's the right way to update the major, minor or patch version correctly. No matter which type I selected (fix, feat, docs), I always ended up with a major version when running "lerna-semantic-release pre"

info:    Executing pre in packages/[my-package-name]
info:    Anaylzed 4 / 65 commits to determine type major for [my-npm-artifact]
info:    Relevant commits:
*  347788f0499dd6d099ec7bed41e58ad1c0b0e324
* 2c8f9802205e7a6891e5321e7189e17e58ac6266
* 1ad3d34c31450d16c91652fa6f4c50420d372ae2
* f4ea3d50cf0dc26ae0064a70ba1f4f1b66c9859c
info:    Executing bumpVersionCommitAndTag in packages/[my-package-name]
info:     type=initial, version=1.0.0
info:    Creating tag [my-npm-artifact]@1.0.0
[my package directory]
[my git repo dirertory]
info:    + npm version major --git-tag-version false
v3.0.0
info:    out > v3.0.0

info:    + git commit -anm'chore(release): releasing component

And if I repeat "lerna-semantic-release pre" a couple time, it'll just keep bumping the major version over and over. So I may be ending up with v7.0.0 from v2 if I run the script 5 times.

Am I doing this wrong?

bradbarrow commented 7 years ago

We're having the exact same issue, any luck fixing this @phuo1032 ?

Thanks in advance

phuo1032 commented 7 years ago

@bradbarrow, I forgot about the ticket myself. Yes, I did find out why. We are using private artifactory. Therefore, the default setup is never able to determine the current released version or hash. I forked this repo and modify the code that determines these data.

amurdock commented 7 years ago

@bradbarrow I think this pr sorts the issue you're experiencing.