Bug 1520365 - Use Thunderbird version number, including beta version, for Lightning and GData Provider; r=Fallen
authorGeoff Lankow <geoff@darktrojan.net>
Thu, 04 Jul 2019 21:04:37 +1200
changeset 36027 20be9dc63498172a68daea91dba46083a97abaec
parent 36026 63cc3743efc6bfc78e9e779d459c046bb5440a71
child 36028 56961a825e639c25fcb980603cf4fef0c3c79461
push id392
push userclokep@gmail.com
push dateMon, 02 Sep 2019 20:17:19 +0000
reviewersFallen
bugs1520365
Bug 1520365 - Use Thunderbird version number, including beta version, for Lightning and GData Provider; r=Fallen
calendar/lightning/moz.build
calendar/lightning/versions.mk
calendar/providers/gdata/Makefile.in
--- a/calendar/lightning/moz.build
+++ b/calendar/lightning/moz.build
@@ -15,23 +15,17 @@ DIRS += [
 ]
 
 TEST_DIRS += ['../test']
 
 if CONFIG['MOZ_ARTIFACT_BUILDS']:
     version_parts = CONFIG['MOZ_APP_VERSION'].split('.')
     major_version = version_parts[0]
     DEFINES['THUNDERBIRD_MAXVERSION'] = major_version + '.*'
-
-    version_parts[0] = '%.1f' % ((int(major_version) + 2.) / 10.)
-    while version_parts[-1] == '0':
-        version_parts = version_parts[:-1]
-    lightning_version = '.'.join(version_parts)
-    lightning_version = lightning_version.replace('.0a', 'a')
-    DEFINES['LIGHTNING_VERSION'] = lightning_version
+    DEFINES['LIGHTNING_VERSION'] = CONFIG['THUNDERBIRD_VERSION_DISPLAY']
 
     XPI_NAME = 'lightning'
     export('XPI_NAME')
 else:
     if CONFIG['NIGHTLY_BUILD']:
         DIST_SUBDIR = 'extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}'
     else:
         DIST_SUBDIR = 'distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}'
--- a/calendar/lightning/versions.mk
+++ b/calendar/lightning/versions.mk
@@ -4,17 +4,17 @@
 
 # Lighting version number
 THUNDERBIRD_VERSION := $(shell cat $(commtopsrcdir)/mail/config/version.txt)
 SEAMONKEY_VERSION := $(shell cat $(commtopsrcdir)/suite/config/version.txt)
 
 ifdef MOZ_SUITE
 LIGHTNING_VERSION := $(shell $(PYTHON) $(commtopsrcdir)/calendar/lightning/build/makeversion.py $(THUNDERBIRD_VERSION))
 else
-LIGHTNING_VERSION := $(shell $(PYTHON) $(commtopsrcdir)/calendar/lightning/build/makeversion.py $(word 1,$(MOZ_PKG_VERSION) $(THUNDERBIRD_VERSION)))
+LIGHTNING_VERSION := $(THUNDERBIRD_VERSION_DISPLAY)
 endif
 
 # For extensions we require a max version that is compatible across security releases.
 # THUNDERBIRD_MAXVERSION and SEAMONKEY_MAXVERSION is our method for doing that.
 # Alpha versions 10.0a1 and 10.0a2 aren't affected
 # For Seamonkey, 2.17 becomes 2.17.*, 2.17.1 becomes 2.17.*
 # For Thunderbird, 10.0 becomes 10.*, 10.0.1 becomes 10.*
 THUNDERBIRD_MAXVERSION := $(THUNDERBIRD_VERSION)
--- a/calendar/providers/gdata/Makefile.in
+++ b/calendar/providers/gdata/Makefile.in
@@ -8,20 +8,20 @@ XPI_EM_ID = {a62ef8ec-5fdc-40c2-873c-223
 XPI_INSTALL_EXTENSION = $(XPI_EM_ID)
 
 THUNDERBIRD_VERSION := $(shell cat $(commtopsrcdir)/mail/config/version.txt)
 SEAMONKEY_VERSION := $(shell cat $(commtopsrcdir)/suite/config/version.txt)
 
 ifdef MOZ_SUITE
 LIGHTNING_VERSION := $(shell $(PYTHON) $(commtopsrcdir)/calendar/lightning/build/makeversion.py $(THUNDERBIRD_VERSION))
 else
-LIGHTNING_VERSION := $(shell $(PYTHON) $(commtopsrcdir)/calendar/lightning/build/makeversion.py $(word 1,$(MOZ_PKG_VERSION) $(THUNDERBIRD_VERSION)))
+LIGHTNING_VERSION := $(THUNDERBIRD_VERSION_DISPLAY)
 endif
 
-GDATA_VERSION := $(shell $(PYTHON) $(commtopsrcdir)/calendar/providers/gdata/makeversion.py $(LIGHTNING_VERSION))
+GDATA_VERSION := $(THUNDERBIRD_VERSION_DISPLAY)
 
 
 DEFINES += -DSEAMONKEY_VERSION=$(SEAMONKEY_VERSION) \
            -DTHUNDERBIRD_VERSION=$(THUNDERBIRD_VERSION) \
            -DGDATA_VERSION=$(GDATA_VERSION) \
            $(NULL)
 
 include $(commtopsrcdir)/calendar/lightning/lightning-packager.mk