Bug 688719 - Automate setting minversion/maxversion for release builds r=philipp a=philipp
authorStefan Sitter <ssitter@gmail.com>
Wed, 27 Jun 2012 20:50:48 +0200
changeset 11320 39e98d7601477dfaae9d1620001727d3acb36814
parent 11319 6200fab479cb43278fe2e44b162f0a8f736b8255
child 11321 fe09587e027c1119d870a7c4010ee6349b416a93
push id608
push userssitter@gmail.com
push dateWed, 27 Jun 2012 18:51:10 +0000
treeherdercomm-aurora@39e98d760147 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersphilipp, philipp
bugs688719
Bug 688719 - Automate setting minversion/maxversion for release builds r=philipp a=philipp
calendar/lightning/Makefile.in
calendar/lightning/install.rdf
--- a/calendar/lightning/Makefile.in
+++ b/calendar/lightning/Makefile.in
@@ -23,16 +23,29 @@ XPI_EM_ID = {e2fda1a4-762b-4020-b5ad-a41
 DIST_FILES = install.rdf application.ini
 PREF_JS_EXPORTS = $(srcdir)/content/lightning.js
 
 # Lighting version number
 LIGHTNING_VERSION := $(shell cat $(srcdir)/../sunbird/config/version.txt)
 THUNDERBIRD_VERSION := $(shell cat $(topsrcdir)/mail/config/version.txt)
 SEAMONKEY_VERSION := $(shell cat $(topsrcdir)/suite/config/version.txt)
 
+# For extensions we require a max version that is compatible across security releases.
+# THUNDERBIRD_MAXVERSION and SEAMONKEY_MAXVERSION is our method for doing that.
+# 10.0a1 and 10.0a2 aren't affected, 10.0 becomes 10.0.*, 10.0.1 becomes 10.0.*
+THUNDERBIRD_MAXVERSION := $(THUNDERBIRD_VERSION)
+ifneq (a,$(findstring a,$(THUNDERBIRD_VERSION)))
+THUNDERBIRD_MAXVERSION := $(shell echo $(THUNDERBIRD_VERSION) | sed "s|\(^[0-9]*.[0-9]*\).*|\1|" ).*
+endif
+
+SEAMONKEY_MAXVERSION := $(SEAMONKEY_VERSION)
+ifneq (a,$(findstring a,$(SEAMONKEY_VERSION)))
+SEAMONKEY_MAXVERSION := $(shell echo $(SEAMONKEY_VERSION) | sed "s|\(^[0-9]*.[0-9]*\).*|\1|" ).*
+endif
+
 ifneq (,$(findstring pre,$(LIGHTNING_VERSION)))
 DEFINES += -DLIGHTNING_PRERELEASE_VERSION=1
 endif
 
 ifdef LIGHTNING_UPDATE_LOCATION
 DEFINES += -DLIGHTNING_UPDATE_LOCATION=$(LIGHTNING_UPDATE_LOCATION)
 endif
 
@@ -102,18 +115,20 @@ else
 ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
 THEME=pinstripe
 else
 THEME=winstripe
 endif
 endif
 
 DEFINES += -DTHUNDERBIRD_VERSION=$(THUNDERBIRD_VERSION) \
+           -DTHUNDERBIRD_MAXVERSION=$(THUNDERBIRD_MAXVERSION) \
            -DAB_CD=$(AB_CD) \
            -DSEAMONKEY_VERSION=$(SEAMONKEY_VERSION) \
+           -DSEAMONKEY_MAXVERSION=$(SEAMONKEY_MAXVERSION) \
            -DLIGHTNING_VERSION=$(LIGHTNING_VERSION) \
            -DTARGET_PLATFORM=$(OS_TARGET)_$(TARGET_XPCOM_ABI) \
            -DXPI_EM_ID=$(XPI_EM_ID) \
            -DTHEME=$(THEME) \
            $(NULL)
 
 GRE_BUILDID = $(shell $(PYTHON) $(MOZILLA_SRCDIR)/config/printconfigsetting.py $(LIBXUL_DIST)/bin/platform.ini Build BuildID)
 DEFINES += -DGRE_BUILDID=$(GRE_BUILDID)
--- a/calendar/lightning/install.rdf
+++ b/calendar/lightning/install.rdf
@@ -11,26 +11,26 @@
   <Description about="urn:mozilla:install-manifest">
     <!-- Target Application this extension can install into,
         with minimum and maximum supported versions. -->
     <em:targetApplication>
       <Description>
         <!-- thunderbird -->
         <em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id>
         <em:minVersion>@THUNDERBIRD_VERSION@</em:minVersion>
-        <em:maxVersion>@THUNDERBIRD_VERSION@</em:maxVersion>
+        <em:maxVersion>@THUNDERBIRD_MAXVERSION@</em:maxVersion>
       </Description>
     </em:targetApplication>
 
     <em:targetApplication>
       <Description>
         <!-- seamonkey -->
         <em:id>{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}</em:id>
         <em:minVersion>@SEAMONKEY_VERSION@</em:minVersion>
-        <em:maxVersion>@SEAMONKEY_VERSION@</em:maxVersion>
+        <em:maxVersion>@SEAMONKEY_MAXVERSION@</em:maxVersion>
       </Description>
     </em:targetApplication>
 
     <em:id>@XPI_EM_ID@</em:id>
     <em:name>Lightning</em:name>
     <em:version>@LIGHTNING_VERSION@</em:version> <!-- BuildID=@GRE_BUILDID@ -->
     <em:description>An integrated calendar for Thunderbird</em:description>
 #ifdef LIGHTNING_PRERELEASE_VERSION