Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/xmlcli/UefiFwParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -1269,7 +1269,7 @@ def GetsetBiosKnobsFromBin(BiosBinaryFile=0, BiosOutSufix=0, Operation='genxml',
if (XmlFilename == 0):
XmlFilename = os.path.join(clb.TempFolder, '%s_FwInfo.xml' %BiosIdString)
file_content = '<SYSTEM>\n'
'\t<PLATFORM NAME=\"Generated by XmlCli Ref. Scripts Version %d.%d.%d - xmlcli.UefiFwParser.py\"/>\n' %(clb.__version__.version[0], clb.__version__.version[1], clb.__version__.version[2])
'\t<PLATFORM NAME=\"Generated by XmlCli Ref. Scripts Version %s - xmlcli.UefiFwParser.py\"/>\n' % clb.__version__
BiosIdLst = BiosIdString.split('.')
BiosDate = BiosIdLst[len(BiosIdLst)-1]
if(FoundPcBuild):
Expand Down
22 changes: 14 additions & 8 deletions src/xmlcli/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
from distutils.version import LooseVersion
class Version:
def __init__(self, major, minor, build, tag=""):
self.major=major
self.minor=minor
self.build=build
self.tag=tag

def __str__(self):
return f"{self.major}.{self.minor}.{self.build}{self.tag}"

# MAJOR ----------
# incremented any time you change the API that may break backwards compatibility
Expand All @@ -7,12 +15,10 @@
# MINOR ------------
MINOR = 0
# BUILD ------
BUILD = 4 # or __revision__
BUILD = 5 # or __revision__
# TAG -------
TAG = ""
__version__ = LooseVersion("{major}.{minor}.{build}{tag}".format(
major=MAJOR,
minor=MINOR,
build=BUILD,
tag=TAG
))

version_instance = Version(MAJOR, MINOR, BUILD, TAG)

__version__ = str(version_instance)