Bug 451461 - make target that prepares l10n repackages to upload to ftp; r=ted.mielczarek

This commit is contained in:
Armen Zambrano Gasparnian (armenzg@mozilla.com> 2008-09-21 18:10:38 +02:00
parent bec94a358a
commit ca628c621f

View File

@ -342,3 +342,49 @@ ifeq ($(OS_ARCH), WINNT)
@$(WGET) -nv --output-document $(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe $(EN_US_BINARY_URL)/$(PKG_PATH)$(PKG_INST_BASENAME).exe
@echo "Downloaded $(EN_US_BINARY_URL)/$(PKG_PATH)$(PKG_INST_BASENAME).exe to $(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME)"
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
endif
ifeq (Darwin, $(OS_ARCH))
XPI_DESTINATION = mac-xpi
endif
ifeq (WINNT, $(OS_ARCH))
XPI_DESTINATION = windows-xpi
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 XPI_DESTINATION
$(error XPI_DESTINATION not defined; \
This is the folder where the xpi files will be moved to)
endif
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)