mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-15 08:53:07 +09:00
Pick up major+minor milestone version from GRE milestone file.
This commit is contained in:
parent
14b6e5e8f2
commit
29c96b568b
1 changed files with 9 additions and 3 deletions
|
|
@ -43,6 +43,12 @@ def get_milestone_major(milestone):
|
|||
|
||||
return milestone.split('.')[0]
|
||||
|
||||
def get_milestone_minor(milestone):
|
||||
"""
|
||||
Returns the minor (second) part of the milestone.
|
||||
"""
|
||||
|
||||
return milestone.split('.')[1]
|
||||
|
||||
def main(args):
|
||||
parser = argparse.ArgumentParser()
|
||||
|
|
@ -56,9 +62,9 @@ def main(args):
|
|||
milestone = get_official_milestone(milestone_file)
|
||||
|
||||
if options.uaversion:
|
||||
# Only expose the major milestone in the UA string, hide the patch
|
||||
# level (bugs 572659 and 870868).
|
||||
uaversion = "%s.0" % (get_milestone_major(milestone),)
|
||||
# Only expose the major+minor milestone in the UA string.
|
||||
uaversion = "%s.%s" % (get_milestone_major(milestone),
|
||||
get_milestone_minor(milestone))
|
||||
print(uaversion)
|
||||
|
||||
elif options.symbolversion:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue