markchalloner / git-semver

Git plugin for Semantic Versioning
MIT License
382 stars 43 forks source link

two questions ... #22

Closed sunnysideup closed 6 years ago

sunnysideup commented 6 years ago

Hi,

Just wondering if anyone is working on

(a) a system that automagically works out if a tag is MAJOR / MINOR / PATCH based on the commit message

(b) adding git push --tags to the end of the script

Let me know where we can help - if not.

Thank you

Nicolaas PS awesome module

markchalloner commented 6 years ago

Hi Nicolas,

I'm afraid I don't have the time to add new features, however, if you open a pull request I'll happily review with a view to merging and tagging a new version.

Regards Mark

sunnysideup commented 6 years ago

Hi Mark,

Thank you for your reply.

Are these good ideas at all?

git push --tags should be easy, but may be controversial.

automatigically adding a new tag would be awesome, especially if you can set your own keywords for commit messages.

I will have a look.

Thank you again

markchalloner commented 6 years ago

automatigically adding a new tag would be awesome, especially if you can set your own keywords for commit messages.

I don't think this would be possible in this project, however there's nothing to stop you adding a post-commit hook that parses the commit message for a bump (e.g. #major) and subsequently calls git semver. You might want to check out icefox/git-hooks or the newer git-hooks/git-hooks to version control that.

git push --tags should be easy, but may be controversial.

I agree. It sounds like a useful feature to have but I suggest this should be dependent on config and default to off.

Alternatively this could be done in the same post-commit hook as above.