AppImageCrafters / appimage-builder

GNU/Linux packaging solution using the AppImage format
MIT License
316 stars 58 forks source link

Version flags (-v and --version) #232

Closed iTrooz closed 2 years ago

iTrooz commented 2 years ago

appimager-builder currently doesn't have a version flag. I think it would be pretty useful to have one, that would display appimage-builder (and appimagetool ?) versions

I'm willing to submit a PR for this, if needed

azubieta commented 2 years ago

You're right, feel free to send the PR. Would it be possible to fetch it from here:

https://github.com/AppImageCrafters/appimage-builder/blob/main/setup.py#L22

iTrooz commented 2 years ago

Fetching it from setup.py doesn't seems possible This problem seems to be common with python packages, and there are a few way to go around it : https://packaging.python.org/en/latest/guides/single-sourcing-package-version/

Personally, I think using a separate version.txt file to hold to version (that would be read in setup.py and main.py) would be the best approach. What do you think ?

azubieta commented 2 years ago

This looks good as we already use git. https://pypi.org/project/setuptools-scm/