lerna version --force modifier (feature request)
See original GitHub issueTLDR: A flag or modifier to skip checks for looking for lerna packages changes is desirable. Which would allow a version bump to occur regardless of changes or not.
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
Unlike npm version
lerna version
has smarts in it which prevent versioning of any bump of any of the underlying packages unless there are real changes.
Now in the node world I agree that this is fine and dandy as most of us like to operate off of master. But by not making this optional it is making it virtually impossible to cleanly create custom SNAPSHOT
version number for developers being ruled by a Java overlord.
Example of the problem:
Start at version 0.1.1
# good to go we have a real patch version
yarn lerna version patch
now at 0.1.2
# increment patch to become current SNAPSHOT to make java lead happy
yarn lerna version patch --no-git-tag-version # fails, no changes still on 0.1.2
yarn lerna version ${NEW_VERSION}-SNAPSHOT --no-git-tag-version # fails, no changes still on 0.1.2
Possible solution: Back at 0.1.1
Example of --force
:
# good to go we have a real patch version
yarn lerna version patch
now at 0.1.2
# increment patch to become current SNAPSHOT to make java lead happy
yarn lerna version patch --force --no-git-tag-version # 0.1.2
yarn lerna version ${NEW_VERSION}-SNAPSHOT --force --no-git-tag-version # 0.1.2-SNAPSHOT
Apologies if there is a way around this that I missed. But this line check appears to me that there is no way around it.
https://github.com/lerna/lerna/blob/master/commands/version/index.js#L204
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:5 (1 by maintainers)
Top GitHub Comments
--force-publish
?I tested
and it worked perfectly for me. Thank you for the quick fix.