From d3f9ecb7379d021e9df9b8f4d600b3fc32abee44 Mon Sep 17 00:00:00 2001 From: "reed%reedloden.com" Date: Wed, 27 Aug 2008 05:26:24 +0000 Subject: [PATCH] Bug 451461 - "make target that prepares l10n repackages to upload to ftp" (prepare repackages in correct structure to upload to ftp server) [p=armenzg@mozilla.com (Armen Zambrano Gasparnian [armenzg]) r=ted/luser] git-svn-id: svn://10.0.0.236/trunk@253858 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/browser/locales/Makefile.in | 43 +++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/mozilla/browser/locales/Makefile.in b/mozilla/browser/locales/Makefile.in index 4b417ff49ef..6d028d5cef5 100644 --- a/mozilla/browser/locales/Makefile.in +++ b/mozilla/browser/locales/Makefile.in @@ -325,3 +325,46 @@ ifdef MOZ_CRASHREPORTER libs:: $(addprefix $(LOCALE_SRCDIR)/,crashreporter/crashreporter-override.ini) $(SYSINSTALL) $(IFLAGS1) $^ $(FINAL_TARGET) endif + + +#These make targets call prepare-repackages by setting different UPLOAD_DIR +prepare-upload-latest-%: + @$(MAKE) prepare-repackages-$* UPLOAD_DIR=$(DIST)/upload/latest + +prepare-upload-dated-%: + @$(MAKE) prepare-repackages-$* UPLOAD_DIR=$(DIST)/upload/`date "+%Y-%m-%d-%H"`-$(MOZ_PKG_APPNAME)$(MOZ_APP_VERSION)-l10n + +#Each platform uploads their xpi files to different folders +ifeq (Linux, $(OS_ARCH)) +XPI_DESTINATION = linux-xpi +else ifeq (Darwin, $(OS_ARCH)) +XPI_DESTINATION = mac-xpi +else ifeq (WINNT, $(OS_ARCH)) +XPI_DESTINATION = windows-xpi +else +XPI_DESTINATION = $(error Unsupported platform) +endif + +# This target will generate a UPLOAD_DIR folder with +# l10n repackages in the way that we offer l10n nightlies +# 1) ./ the binary +# 2) ./{linux,mac,windows}-xpi/locale.xpi +prepare-repackages-%: +ifndef UPLOAD_DIR + $(error UPLOAD_DIR not defined) +endif + $(NSINSTALL) -D $(UPLOAD_DIR) + $(NSINSTALL) -D $(UPLOAD_DIR)/$(XPI_DESTINATION) +# Move the langpack + mv $(DIST)/install/firefox-$(MOZ_APP_VERSION).$*.langpack.xpi \ + $(UPLOAD_DIR)/$(XPI_DESTINATION)/$*.xpi +# Move the repackage + mv $(DIST)/firefox-$(MOZ_APP_VERSION).$*.* \ + $(UPLOAD_DIR)/. +# Move the windows installer +ifeq (WINNT, $(OS_ARCH)) + mv $(DIST)/install/sea/firefox-$(MOZ_APP_VERSION).$*.win32.installer.exe \ + $(UPLOAD_DIR)/. +endif +# Set the permissions that the folders will have in ftp once uploaded + chmod -vR 775 $(UPLOAD_DIR)