dist: add 8-character commit hash to version information
This commit is contained in:
parent
d61d507a2b
commit
49c7e5cc44
|
@ -16,5 +16,11 @@
|
||||||
## with this program; if not, write to the Free Software Foundation, Inc.,
|
## with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
|
||||||
__version__ = '1.1.7'
|
__version_short__ = '1.1.7'
|
||||||
NAME = 'Solaar'
|
NAME = 'Solaar'
|
||||||
|
|
||||||
|
try:
|
||||||
|
import gitinfo
|
||||||
|
__version__ = __version_short__ + '-' + gitinfo.get_git_info()['commit'][:8]
|
||||||
|
except Exception:
|
||||||
|
__version__ = __version_short__
|
||||||
|
|
3
setup.py
3
setup.py
|
@ -11,7 +11,7 @@ main_ns = {}
|
||||||
with open('lib/solaar/__init__.py') as ver_file:
|
with open('lib/solaar/__init__.py') as ver_file:
|
||||||
exec(ver_file.read(), main_ns)
|
exec(ver_file.read(), main_ns)
|
||||||
NAME = main_ns['NAME']
|
NAME = main_ns['NAME']
|
||||||
__version__ = main_ns['__version__']
|
__version__ = main_ns['__version_short__']
|
||||||
|
|
||||||
|
|
||||||
def _data_files():
|
def _data_files():
|
||||||
|
@ -72,6 +72,7 @@ For instructions on installing Solaar see https://pwr-solaar.github.io/Solaar/in
|
||||||
extras_require={
|
extras_require={
|
||||||
'report-descriptor': ['hid-parser'],
|
'report-descriptor': ['hid-parser'],
|
||||||
'desktop-notifications': ['Notify (>= 0.7)'],
|
'desktop-notifications': ['Notify (>= 0.7)'],
|
||||||
|
'git-commit': ['python-git-info'],
|
||||||
},
|
},
|
||||||
package_dir={'': 'lib'},
|
package_dir={'': 'lib'},
|
||||||
packages=['keysyms', 'hidapi', 'logitech_receiver', 'solaar', 'solaar.ui', 'solaar.cli'],
|
packages=['keysyms', 'hidapi', 'logitech_receiver', 'solaar', 'solaar.ui', 'solaar.cli'],
|
||||||
|
|
Loading…
Reference in New Issue