Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need a release tag create to add a homebrew recipe #54

Open
josmo opened this issue Feb 25, 2014 · 1 comment
Open

Need a release tag create to add a homebrew recipe #54

josmo opened this issue Feb 25, 2014 · 1 comment

Comments

@josmo
Copy link

josmo commented Feb 25, 2014

@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!

@mhagger
Copy link
Owner

mhagger commented Feb 26, 2014

OK I just pushed a tag 0.7.0.

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__)

Thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants