rubenv / grunt-git

Git commands for grunt.
MIT License
227 stars 83 forks source link

allow deletion of tags #69

Closed pghalliday closed 10 years ago

pghalliday commented 10 years ago

It would be nice if I could delete tags. Currently I have a release process that reads the version number from a version.json file and automatically creates the tag locally and then pushes it:

git tag releases/x.y.z
git push --tags

These 2 commands can be achieved currently with grunt-git

Occasionally I make a mistake and would like to undo this :o

git tag -d releases/x.y.z
git push origin :releases/x.y.z

The second command I can do with gitpush but the first I cannot do with gittag. I tried setting the tag option to -d releases/x.y.z but this displeases the spawn call (I don't know why).

This pull request adds a remove option to gittag to add the -d to the args array.

I chose remove for the option name instead of delete as delete is a keyword and although probably fine, gets highlighted as such in editors

rubenv commented 10 years ago

I chose remove for the option name instead of delete as delete is a keyword and although probably fine, gets highlighted as such in editors

Having delete as a key is perfectly valid, but I see the concern. I'd like to have commands map 1:1 with the git options, but I'll allow it here. Good patch.

rubenv commented 10 years ago

Released to NPM as 0.2.15.

Thanks a lot!

pghalliday commented 10 years ago

Cool, thanks :)