leeping/forcebalance — pull request #9 by ahvigil (2013-08-16 22:53:48+00:00)
Title: Improved versioning using git tags

This is a suggestion for a more rigorous versioning scheme for forcebalance.

This implements a more sophisticated forcebalance versioning mechanism that uses git tags to mark forcebalance released. setup.py would use the "git difference" command to check what revision of forcebalance is being installed, or use a version number written to a .__version__ file if not working in a git repository.

For example, for a 1.2 release you could do
`git tag -a v1.2.0 -m "ForceBalance 1.2 release
git push --tag`
to create a tag at that commit marking the release. Any runs of the setup.py script will use that tag as the base version.
`git difference`
provides a string with the most recent tag followed by the number of commits since then. This allows tracking versions on the level of individual commits.

The only downside is that we need to add another file .__version__ to store a persistent version number if the git tools are unavailable.