Part of bug 685133. Create a lightning upload target for releases, and fix the repack-l10n-all target to work with shipped-locales. r+a=Fallen
authorMark Banner <bugzilla@standard8.plus.com>
Fri, 23 Sep 2011 12:05:12 +0100
changeset 30665 0a19c0eb253385be2e28cb286364c6130e1b6488
parent 30664 2764ecb73c4f998b8f6fa8f68f162b2ec0938a81
child 30666 30bf8ac871916c53910e15dd08e9b277380c837d
child 30675 812667501ca6955e2599d28e35dd19c376ed9c80
push id1
push userclokep@gmail.com
push dateMon, 07 May 2018 22:45:56 +0000
treeherdercomm-esr60@57eacde5ef40 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs685133
Part of bug 685133. Create a lightning upload target for releases, and fix the repack-l10n-all target to work with shipped-locales. r+a=Fallen
calendar/lightning/lightning-packager.mk
--- a/calendar/lightning/lightning-packager.mk
+++ b/calendar/lightning/lightning-packager.mk
@@ -92,20 +92,28 @@ ifeq ($(MOZ_CHROME_FILE_FORMAT),flat)
 else ifeq ($(MOZ_CHROME_FILE_FORMAT),jar)
 	$(RM) -rf $(L10N_TARGET)/chrome/lightning-en-US.jar
 	$(RM) -rf $(L10N_TARGET)/chrome/calendar-en-US.jar
 else
 	@echo "ERROR: Unhandled chrome file format: $(MOZ_CHROME_FILE_FORMAT)"
 	@exit 1
 endif
 
+ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
+SHORTOS = osx
+else
+# For now, osx is the only special case. Therefore, we can just fallback to
+# detecting linux which should be the second argument.
+SHORTOS = linux
+endif
+
 # Repack the existing lightning to contain all locales in lightning-all.xpi
 repack-l10n-all: AB_CD=all
 repack-l10n-all: L10N_XPI_NAME=lightning-all
-repack-l10n-all: repack-clobber-all $(addprefix libs-,$(shell cat $(topsrcdir)/calendar/locales/shipped-locales))
+repack-l10n-all: repack-clobber-all $(addprefix libs-,$(shell awk '{ if ($$2 == "" || $$2 == "$(SHORTOS)") { print $$1 } }' $(topsrcdir)/calendar/locales/shipped-locales))
 
 .PHONY : repack-l10n-all
 
 # Helper target to align names better to targets from other locale Makefiles
 repack-l10n-%:
 	$(MAKE) AB_CD=$* repack-l10n
 
 # Actual locale packaging targets. If L10N_XPI_NAME is set, then use it.
@@ -135,8 +143,25 @@ repack-process-extrafiles:
 	 
 	 echo -n "SourceRepository=" >> $(LIBXUL_DIST)/bin/platform.ini
 	 $(PYTHON) $(MOZILLA_SRCDIR)/config/printconfigsetting.py $(DIST)/xpi-stage/$(XPI_NAME)/application.ini Build SourceRepository >> $(LIBXUL_DIST)/bin/platform.ini
 	 
 	 echo -n "BuildID=" >> $(LIBXUL_DIST)/bin/platform.ini
 	 $(PYTHON) $(MOZILLA_SRCDIR)/config/printconfigsetting.py $(DIST)/xpi-stage/$(XPI_NAME)/application.ini App BuildID >> $(LIBXUL_DIST)/bin/platform.ini
 
 recreate-platformini: $(LIBXUL_DIST)/bin/platform.ini
+
+UPLOAD_FILES = \
+  lightning.xpi \
+  gdata-provider.xpi \
+  $(NULL)
+
+upload:
+	$(NSINSTALL) -D $(DIST)/$(MOZ_PKG_PLATFORM)
+ifdef UNIVERSAL_BINARY
+	cp -RL $(DIST)/universal/xpi-stage/lightning-all.xpi $(DIST)/$(MOZ_PKG_PLATFORM)/lightning.xpi
+	$(INSTALL) $(IFLAGS1) $(DIST)/universal/xpi-stage/gdata-provider.xpi $(DIST)/$(MOZ_PKG_PLATFORM)
+else
+	cp -RL $(DIST)/xpi-stage/lightning-all.xpi $(DIST)/$(MOZ_PKG_PLATFORM)/lightning.xpi
+	$(INSTALL) $(IFLAGS1) $(DIST)/xpi-stage/gdata-provider.xpi $(DIST)/$(MOZ_PKG_PLATFORM)
+endif
+	$(PYTHON) $(MOZILLA_DIR)/build/upload.py --base-path $(DIST) \
+	  $(addprefix $(DIST)/$(MOZ_PKG_PLATFORM)/,$(UPLOAD_FILES))