[SWDEV-515031] Change Header Version to 25.2.0 (#109)
Change Versioning Scheme to match https://semver.org/
Dropping the year enum and API fields in a future release.
Should not impact library versioning since we are now starting from 25.2.0
---------
Signed-off-by: Joseph Narlo <joseph.narlo@amd.com>
Co-authored-by: Arif, Maisam <Maisam.Arif@amd.com>
Change-Id: Id090e23f156926d08f9c0b781447388adf268cf6
[ROCm/amdsmi commit: d7c3ad0886]
This commit is contained in:
committed by
Maisam Arif
parent
15c8855a0b
commit
a097bb5fe2
@@ -13,7 +13,6 @@ def get_version_info(filepath):
|
||||
content = f.read()
|
||||
|
||||
version_pattern = (
|
||||
r"^#define\s+AMDSMI_LIB_VERSION_YEAR\s+(\d+)\s*$|"
|
||||
r"^#define\s+AMDSMI_LIB_VERSION_MAJOR\s+(\d+)\s*$|"
|
||||
r"^#define\s+AMDSMI_LIB_VERSION_MINOR\s+(\d+)\s*$|"
|
||||
r"^#define\s+AMDSMI_LIB_VERSION_RELEASE\s+(\d+)\s*$"
|
||||
@@ -21,19 +20,19 @@ def get_version_info(filepath):
|
||||
|
||||
matches = re.findall(version_pattern, content, re.MULTILINE)
|
||||
|
||||
if len(matches) == 4:
|
||||
version_year, version_major, version_minor, version_release = [
|
||||
if len(matches) == 3:
|
||||
version_major, version_minor, version_release = [
|
||||
match for match in matches if any(match)
|
||||
]
|
||||
return version_year[0], version_major[1], version_minor[2], version_release[3]
|
||||
return version_major[0], version_minor[1], version_release[2]
|
||||
else:
|
||||
raise ValueError("Couldn't find all VERSION numbers.")
|
||||
|
||||
|
||||
version_year, version_major, version_minor, version_release = get_version_info(
|
||||
version_major, version_minor, version_release = get_version_info(
|
||||
"../include/amd_smi/amdsmi.h"
|
||||
)
|
||||
version_number = f"{version_year}.{version_major}.{version_minor}.{version_release}"
|
||||
version_number = f"{version_major}.{version_minor}.{version_release}"
|
||||
|
||||
# project info
|
||||
project = "AMD SMI"
|
||||
|
||||
Reference in New Issue
Block a user