You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sorry I didn't get to this quicker, but really, we need more than just version tags and I was researching how best to do it. But my research is taking longer than I'd hoped, so here is your tag.
Beyond a version tag, there should be a mechanism for the script itself to know its version number, so that (for example) we can ask people who file a bug report to run git-imerge --version to be sure which version they were using. It is a little bit awkward to do so based only on a Git tag. Because on the one hand if the script is not running from within a Git working copy, then you want it to be able to read the version directly from a file without going to the overhead of running Git. But on the other hand, if the script is running from within a Git working copy, then you want it to figure out the version of the current HEAD commit rather than use a version number from a file that might be stale. But I don't want the process to rely on a "build" step that people (including me!) might forget.
I think what I'd like to do is have the working copy version always try to get its version number from Git using something like this. But at the install step, the version number should be baked into the program somehow. Maybe it could be as simple as using code like this:
try:
from version_from_git import __version__
except ImportError:
from version import __version__
The source tree would have a file version_from_git.py, but that file would never be installed. Instead, the installation process would generate a file version.py on the fly via something like
from version_from_git import __version__
with open('version.py', 'w') as f:
f.write('__version__ = %r\n' % __version__)
@mhagger thanks for pulling in the makefile change. I still need a release tag on the current version to be able to create a homebrew recipe for it.
Thanks a bunch!
The text was updated successfully, but these errors were encountered: