mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-01 03:21:41 +00:00
break for all errors that would raise when checking for version, make them UNRELEASED
This commit is contained in:
parent
3393ad623f
commit
81d90d7fb7
@ -60,6 +60,9 @@ copyright = u'2017, OpenMW Team'
|
||||
# The short X.Y version.
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
|
||||
release = version = "UNRELEASED"
|
||||
|
||||
|
||||
def get_openmw_version(haystack):
|
||||
needle = 'OPENMW_VERSION_MAJOR'
|
||||
line_counter = 0
|
||||
@ -68,9 +71,6 @@ def get_openmw_version(haystack):
|
||||
break
|
||||
line_counter += 1
|
||||
|
||||
if line_counter == 0:
|
||||
raise ImportError('Unable to find OpenMW Version')
|
||||
|
||||
version = '.'.join([haystack[line_counter][1][1].contents,
|
||||
haystack[line_counter+1][1][1].contents,
|
||||
haystack[line_counter+2][1][1].contents])
|
||||
@ -83,9 +83,9 @@ try:
|
||||
cmake_data = parsing.parse(cmake_raw)
|
||||
release = version = get_openmw_version(cmake_data)
|
||||
|
||||
except ImportError:
|
||||
release = "UNRELEASED"
|
||||
print("WARNING: Unable to import parse_cmake, version will be set to: {0}.".format(release))
|
||||
except Exception as ex:
|
||||
print("WARNING: Version will be set to '{0}' because: '{1}'.".format(release, str(ex)))
|
||||
import traceback; traceback.print_exc()
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
|
Loading…
Reference in New Issue
Block a user