Bug 688719 - Automate setting minversion/maxversion for release builds r=philipp
authorStefan Sitter <ssitter@gmail.com>
Tue, 26 Jun 2012 21:16:40 +0200
changeset 10521 9ccbefb9df5e86b90c4b69fc6741e627c977a40e
parent 10520 bbe839080d59e1c288f1224ceb24ad6dc66245a5
child 10522 9631a5ce50645b2b8e6e19c1412c37a01adfc449
push id7953
push userssitter@gmail.com
push dateTue, 26 Jun 2012 19:17:02 +0000
treeherdercomm-central@9ccbefb9df5e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersphilipp
bugs688719
Bug 688719 - Automate setting minversion/maxversion for release builds r=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