2018-09-04 14:59:12 -05:00
|
|
|
NAME = 'openSUSE-release-tools'
|
2019-08-27 14:15:52 -05:00
|
|
|
|
2022-02-18 17:15:48 +01:00
|
|
|
|
2019-08-27 14:15:52 -05:00
|
|
|
def version_calculate():
|
|
|
|
from os import path
|
2023-08-15 11:30:16 +02:00
|
|
|
# osclib is most likely "installed" via a symlink in ~/.osc-plugins
|
|
|
|
# => need to resolve the relative path
|
|
|
|
osc_release_tools_dir = path.abspath(path.join(path.realpath(path.dirname(__file__)), ".."))
|
|
|
|
if path.exists(path.join(osc_release_tools_dir, ".git")):
|
2019-08-27 14:15:52 -05:00
|
|
|
from osclib.git import describe
|
|
|
|
try:
|
2023-08-15 11:30:16 +02:00
|
|
|
return describe(directory=osc_release_tools_dir)
|
2019-08-27 14:15:52 -05:00
|
|
|
except FileNotFoundError:
|
2022-02-18 16:39:16 +01:00
|
|
|
pass # Fall through to final return.
|
2019-08-27 14:15:52 -05:00
|
|
|
|
|
|
|
return '0.0.0-dev'
|
|
|
|
|
2022-02-18 17:11:46 +01:00
|
|
|
|
2019-08-27 14:15:52 -05:00
|
|
|
VERSION = version_calculate()
|