Do not tag version changes with flag like "--no-tags" but do commit version changes
See original GitHub issueExpected Behavior
Needs an option not to tag but to commit in git.
Current Behavior
We have “–no-git-tag-version” option which will nethier commit nor tag version changes." Looking for a similar one
Possible Solution
Would be good if we have option like “–no-tags” in cli or in lerna.json
Context
Tagging versions in git is a better practice. But we need to do this only for actual release (patch, minor and major). For prerelease versions, we don’t want to flood our repo with tags during development.
This is how we currently (planned to) use
# Developers can run this anytime in local
"npm run bump:prerelease"
> "lerna version prerelease --no-tags -y"
# Can run this only when needed (upon release branches)
"npm run bump -- patch"
> "lerna version patch"
These are npm scripts are to be executed at root.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:14
- Comments:6 (2 by maintainers)
Top Results From Across the Web
What are Git Tags and How to create, remove, view ... - Tools QA
Tags in Git are the reference points in the Git history that denotes special events. It is not a rule to tag the...
Read more >Git - Tagging - Git SCM
A lightweight tag is very much like a branch that doesn't change — it's just a pointer to a specific commit. Annotated tags,...
Read more >Configuring runners - GitLab Docs
After the page is refreshed, expand the Runners settings section and check the registration token - it should be changed. From now on...
Read more >What is git tag, How to create tags & How to checkout git ...
Although a tag may appear similar to a branch, a tag, however, does not change. It points directly to a specific commit in...
Read more >Git - Jenkins Plugins
Changelog in GitHub Releases. Release notes are recorded in GitHub Releases since July 1, 2019 (git plugin 3.10.1 and later).
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello. Thanks for raising this issue.
Our team would have a great use of the ability to skip the tagging of the release. I’ve issued a Pull request (#2358) that splits the tagging/committing process during the
lerna version
command.With the suggested changes you can now do:
Motivation
We’re looking for similar functionality to the original poster, our workflow is that all changes must undergo a peer-review, which includes releasing. We are using protected branches (
master
cannot be pushed directly to), changes can only land via a pull request.Our process works like the following:
Using Lerna, we’ve managed to follow this workflow so far, with manual steps. We’d like to try and avoid manual intervention in the future and would like to propose code-changes to make this happen if Lerna maintainers would welcome the additional configuration.
Our current process with Lerna is roughly the following:
npx lerna version --no-push --no-git-tag-version
hub pull-request
)lerna publish from-package
git tag
for all updated versions and then pushes the tags to the git remote.I believe with the introduction of the
--no-git-tag
and--no-git-commit
flags we are making the control over thelerna version
process more granular, and can use those two options internally to substitute--no-git-tag-version
(also included in the Pull request).With the changes our workflow would look like this:
Suggested changes are backward-compatible.
Please let me know what you think about this and how can we proceed. Thank you.
Okay well. I got that git tags are fundamental for Lerna to operate.
We have the below consideration
Since the
--canary
option is only available inlerna publish
command and not inlerna version
command, only Jenkins can publish canary build. But for every commit, new build will be published which we usually don’t prefer.Currently we are doing manually as below (for development build)
lerna version prerelease --no-push --preid 'dev'
bump version without pushing anythinggit tag -d v0.0.1-dev.0
delete the tag in localgit push
and push commits to remoteBy this, we push the version increment only as commit changes and not as tags. We are looking for a way to eliminate this manual process which we feel something like
--no-tags
may be helpful.In a nutshell, we are looking a way which will not tag but will commit the version increment and push to remote