diff options
author | Stephan Bergmann <stephan.bergmann@allotropia.de> | 2024-01-05 16:48:08 +0100 |
---|---|---|
committer | Stephan Bergmann <stephan.bergmann@allotropia.de> | 2024-01-05 17:55:08 +0100 |
commit | feb110d8e9289256ff8c4882892b4c48343719d3 (patch) | |
tree | a41f093c5a698b54165b0657921a5316a98cba35 | |
parent | 7a63830a47ce8e74b30a2a2d2e776025397ce390 (diff) |
Fix `make create-update-info` also for non-Windows
Change-Id: I83a44d0cb563b1caf9459dddec7c6409af6ac0f4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161693
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
-rw-r--r-- | Makefile.gbuild | 2 | ||||
-rwxr-xr-x | bin/update/create_full_mar_for_languages.py | 11 |
2 files changed, 7 insertions, 6 deletions
diff --git a/Makefile.gbuild b/Makefile.gbuild index d86a0cd9ce69..39eab31f95b2 100644 --- a/Makefile.gbuild +++ b/Makefile.gbuild @@ -43,7 +43,7 @@ create-update-info: mkdir -p $(MAR_DIR)/language MAR=$(INSTDIR)/program/mar $(if $(filter WNT,$(OS)),$(shell cygpath -u $(SRCDIR)/bin/update/create_full_mar.py),$(SRCDIR)/bin/update/create_full_mar.py) "$(PRODUCTNAME)" "$(WORKDIR)" "$(MAR_NAME_PREFIX)" "$(ONLINEUPDATE_MAR_CERTIFICATEPATH)" "$(ONLINEUPDATE_MAR_CERTIFICATENAME)" "$(ONLINEUPDATE_MAR_BASEURL)" '$(LIBO_VERSION_MAJOR).$(LIBO_VERSION_MINOR).$(LIBO_VERSION_MICRO).$(LIBO_VERSION_PATCH)' $(if $(filter WNT,$(OS)),, \ - MAR=$(INSTDIR)/program/mar $(SRCDIR)/bin/update/create_full_mar_for_languages.py "$(PRODUCTNAME)" "$(WORKDIR)" "$(MAR_NAME_PREFIX)" "$(ONLINEUPDATE_MAR_CERTIFICATEPATH)" "$(ONLINEUPDATE_MAR_CERTIFICATENAME)" "$(ONLINEUPDATE_MAR_BASEURL)" \ + MAR=$(INSTDIR)/program/mar $(SRCDIR)/bin/update/create_full_mar_for_languages.py "$(PRODUCTNAME)" "$(WORKDIR)" "$(MAR_NAME_PREFIX)" "$(ONLINEUPDATE_MAR_CERTIFICATEPATH)" "$(ONLINEUPDATE_MAR_CERTIFICATENAME)" "$(ONLINEUPDATE_MAR_BASEURL)" '$(LIBO_VERSION_MAJOR).$(LIBO_VERSION_MINOR).$(LIBO_VERSION_MICRO).$(LIBO_VERSION_PATCH)' \ ) upload-update-info: diff --git a/bin/update/create_full_mar_for_languages.py b/bin/update/create_full_mar_for_languages.py index 37d52e77b3ac..d431ecaf6d1a 100755 --- a/bin/update/create_full_mar_for_languages.py +++ b/bin/update/create_full_mar_for_languages.py @@ -10,8 +10,6 @@ from tools import uncompress_file_to_dir, get_file_info from path import UpdaterPath from signing import sign_mar_file -current_dir_path = os.path.dirname(os.path.realpath(__file__)) - def make_complete_mar_name(target_dir, filename_prefix, language): filename = filename_prefix + "_" + language + "_complete_langpack.mar" @@ -26,9 +24,9 @@ def create_lang_infos(mar_file_name, language, url): def main(): - if len(sys.argv) < 7: + if len(sys.argv) < 8: print( - "Usage: create_full_mar_for_languages.py $PRODUCTNAME $WORKDIR $TARGETDIR $TEMPDIR $FILENAMEPREFIX $CERTIFICATEPATH $CERTIFICATENAME $BASEURL") + "Usage: create_full_mar_for_languages.py $PRODUCTNAME $WORKDIR $TARGETDIR $TEMPDIR $FILENAMEPREFIX $CERTIFICATEPATH $CERTIFICATENAME $BASEURL $VERSION") sys.exit(1) certificate_path = sys.argv[4] @@ -37,6 +35,7 @@ def main(): filename_prefix = sys.argv[3] workdir = sys.argv[2] product_name = sys.argv[1] + version = sys.argv[7] updater_path = UpdaterPath(workdir) target_dir = updater_path.get_update_dir() @@ -56,7 +55,9 @@ def main(): mar_file_name = make_complete_mar_name(target_dir, filename_prefix, language) - subprocess.call([os.path.join(current_dir_path, 'make_full_update.sh'), mar_file_name, directory]) + os.putenv('MOZ_PRODUCT_VERSION', version) + os.putenv('MAR_CHANNEL_ID', 'LOOnlineUpdater') + subprocess.call([os.path.join(workdir, 'UnpackedTarball/onlineupdate/tools/update-packaging/make_full_update.sh'), mar_file_name, directory]) sign_mar_file(target_dir, certificate_path, certificate_name, mar_file_name, filename_prefix) |