-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow creating annotated tags #58
Conversation
@@ -181,7 +184,8 @@ def add_path(cls, path): | |||
pass | |||
|
|||
@classmethod | |||
def tag(cls, name): | |||
def tag(cls, name, message): | |||
# TODO: use message? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I appears mercurial has no concept of annotated tags, so maybe throw an error if one is passed instead of silently ignoring it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, but it looks like you can still add a message to a tag?
hg tag v1.0.0 -m "Finally v1.0.0"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
@peritus ping |
describe_out = subprocess.call([vcs, "describe"]) | ||
assert 128 == describe_out | ||
|
||
main(['patch', '--current-version', '42.3.2', '--commit', '--tag', 'VERSION', '--tag-message', 'test {new_version}-tag']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a second test, please split.
Needs docs, needs a test using a configuration file. |
The docs would go in README? |
Sorry, yes, "docs". README it is ;) |
I reworked the tests so they also cover mercurial where appropriate. If you think it's alright then I'll update README as well. |
Btw, since I discovered that |
What's left to do on this before it can be merged? |
I think a rebase, a review and docs in README. |
3d2ce79
to
89e6efa
Compare
Rebased |
def tag(cls, name, message): | ||
command = ["git", "tag", name] | ||
if message: | ||
command += ['-m', message] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be using --message
, because it's clearer.
I really like the straightforwardness (is that even a word?) of this pull request, it just does the one thing it says on the box. However, I'd really like "annotated commits" to be the default, that is, bumpversion should make annotated commits without users configuring that specifically because they know about annotated commits and they know that they're important. That being said, bumpversion/bumpversion/__init__.py Line 784 in 6ec908f
|
Also, what's common practice regarding information to include in annotated tags ? If there are any pointers to blog posts etc. describing what people put in them when releasing, now's the time. |
@peritus I agree with you for the use of annotated tags by default. basically what they contains for the annotation itself, by default, is not that important, what's important is that with annotated tag you know who has submitted it and when it was done. By the way : I'm waiting for this PR quite actively, I've a project where I work and we switched to gerrit code review and it requires annotated tags.. So for now I'm a bit stuck with current bumpversion .. thanks. |
@gst as a workaround you can tag manually (you can configure bumpversion not to tag the commits) |
I will have a look at rebasing + addressing the comments this weekend. |
@cmeeren thx for the tip, effectively, integrated in my .bumpversion.cfg :) |
When creating annotated tags (by passing a message into them), you can use "git describe". This is based on work by @gvangool.
89e6efa
to
ee9d4d4
Compare
@gst Thanks for the reminder :) Updated. It now has a default tag message (can be disabled by passing an empty string) and passes |
@peritus Can this please be merged? I was about to implement this feature myself, glad I checked first :) If the sticking point is docs I'll be happy to pr those once this is in. |
Relates to #74 |
NOTE: due to missing support for annotated tags in bumpversion, this requires https://github.com/ekohl/bumpversion@annotated-tags: pip install git+https://github.com/ekohl/bumpversion@annotated-tags See also peritus/bumpversion#58
Can this feature be added please. We running into issues because bumpversion is not making annotated tags. |
Any timeline on when this is being merged in? It would also help us. |
Any news on this, now that Github actually shows signatures? |
We really enjoy using bumpversion, but really need to have this feature added. When can we expect it? |
@peritus Is there anything additional you want in this PR? I'm sure someone would do it if you let us know what you think it missing. |
+1 |
Apologies for my insistence. I know there are more important things in life than annotated git tags. |
I had to remove the comments because bumpversion will strip them out anyway upon re-writing the updated version string in setup.cfg file. Similarly, I had to normalize the whitespace like bumpversion would do. :-/ `tag=True` option means a tag is automatically created when bumping the version with bumpversion script. However, in order to get 'annotated' instead of 'lightweight' tags -- i.e. the tag also contains the tag author, date and message --, we need to (temporarily?) use a fork of bumpversion that includes an unmerged PR: peritus/bumpversion#58
+1 on annotated tags |
I'd like to see this feature as I use |
+1 |
I was hoping that this would've been merged by now, unfortunately, it doesn't look like this repo is being actively maintained. In the interim, I've forked the project and named it |
maybe we should consider proposing bumpversion to https://jazzband.co/ |
For the lazy people like me a clickable link: https://github.com/c4urself/bump2version @c4urself I considered forking myself but didn't want to commit myself to it and couldn't come up with a name. I like bump2version. @anthrotype It may be a good but that still requires @peritus to transfer the repository. |
@c4urself Awesome. Thanks for taking this on. Could you enable |
@ulope -- done |
The original bumpversion is no longer maintained, this is the new blessed fork peritus/bumpversion#58 (comment) https://github.com/c4urself/bump2version https://pypi.python.org/pypi/bump2version/0.5.5 Annotated tags, e.g. `git tag -am "blah blah"`, can have a message, record the date and the name of the tagger, and work with git `describe`.
Closing because bump2version has been available for quite a while. |
NOTE: due to missing support for annotated tags in bumpversion, this requires https://github.com/ekohl/bumpversion@annotated-tags: pip install git+https://github.com/ekohl/bumpversion@annotated-tags See also peritus/bumpversion#58
When creating annotated tags (by passing a message into them), you can use "git describe".