takeshin takeshin - 1 year ago 132
Git Question

git: Automatic tagging of releases

How do you tag your release versions in git?

Now I have each release identified by build number, but they increment even if there are no changes in the repo. My idea is to have it generated automatically on successful deployment on staging server. E.g.

  • run Hudson build

  • when successful, add new tag, i.e. 1.0-1

  • on next successful build add next tag, 1.0-2

  • version tag is displayed then in site footer

This would require:

  • Hudson to manage next version numbers

  • or script to store last tag in some file

  • or parse git tags to determine last

Any tips?

Answer Source

What you are talking about is more akin to a technical revision number like the one a git describe would generate.

That is different from a true application version, which you should still managed independently from Hudson since it depends on a versioning policy.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download