updater: move the update channel info from the config to versionrc
Change-Id: Id19578a889de51cacac869d7ec681c5c18c40cf9 Reviewed-on: https://gerrit.libreoffice.org/41365 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
This commit is contained in:
23
bin/update/get_update_channel.py
Executable file
23
bin/update/get_update_channel.py
Executable file
@@ -0,0 +1,23 @@
|
|||||||
|
#!/usr/bin/python3
|
||||||
|
# -*- Mode: python; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||||
|
#
|
||||||
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
#
|
||||||
|
|
||||||
|
import sys
|
||||||
|
from config import parse_config
|
||||||
|
|
||||||
|
def main():
|
||||||
|
if len(sys.argv) < 2:
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
update_config = sys.argv[1]
|
||||||
|
config = parse_config(update_config)
|
||||||
|
print(config.channel)
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
|
|
||||||
|
# vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
@@ -687,7 +687,7 @@ void update_checker()
|
|||||||
|
|
||||||
OUString aBuildTarget = "${_OS}_${_ARCH}";
|
OUString aBuildTarget = "${_OS}_${_ARCH}";
|
||||||
rtl::Bootstrap::expandMacros(aBuildTarget);
|
rtl::Bootstrap::expandMacros(aBuildTarget);
|
||||||
OUString aChannel = officecfg::Office::Update::Update::UpdateChannel::get();
|
OUString aChannel = Updater::getUpdateChannel();
|
||||||
static const char* pUpdateChannelEnv = std::getenv("LIBO_UPDATER_CHANNEL");
|
static const char* pUpdateChannelEnv = std::getenv("LIBO_UPDATER_CHANNEL");
|
||||||
if (pUpdateChannelEnv)
|
if (pUpdateChannelEnv)
|
||||||
{
|
{
|
||||||
@@ -835,6 +835,14 @@ OUString Updater::getBuildID()
|
|||||||
return aBuildID;
|
return aBuildID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
OUString Updater::getUpdateChannel()
|
||||||
|
{
|
||||||
|
OUString aUpdateChannel("${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("version") ":UpdateChannel}");
|
||||||
|
rtl::Bootstrap::expandMacros(aUpdateChannel);
|
||||||
|
|
||||||
|
return aUpdateChannel;
|
||||||
|
}
|
||||||
|
|
||||||
void Updater::removeUpdateFiles()
|
void Updater::removeUpdateFiles()
|
||||||
{
|
{
|
||||||
Updater::log("Removing: " + getUpdateFileURL());
|
Updater::log("Removing: " + getUpdateFileURL());
|
||||||
|
@@ -29,6 +29,7 @@ public:
|
|||||||
static OUString getInstallationPath();
|
static OUString getInstallationPath();
|
||||||
|
|
||||||
static OUString getBuildID();
|
static OUString getBuildID();
|
||||||
|
static OUString getUpdateChannel();
|
||||||
|
|
||||||
static void log(const OUString& rMessage);
|
static void log(const OUString& rMessage);
|
||||||
static void log(const OString& rMessage);
|
static void log(const OString& rMessage);
|
||||||
|
@@ -156,6 +156,7 @@ $(call gb_CustomTarget_get_workdir,instsetoo_native/setup)/$(call gb_Helper_get_
|
|||||||
&& echo 'BuildVersion=$(BUILD_VER_STRING)' \
|
&& echo 'BuildVersion=$(BUILD_VER_STRING)' \
|
||||||
&& echo 'buildid=$(shell cd $(SRCDIR) && git log -1 --format=%H)' \
|
&& echo 'buildid=$(shell cd $(SRCDIR) && git log -1 --format=%H)' \
|
||||||
&& echo 'ExtensionUpdateURL=http://updateexte.libreoffice.org/ExtensionUpdateService/check.Update' \
|
&& echo 'ExtensionUpdateURL=http://updateexte.libreoffice.org/ExtensionUpdateService/check.Update' \
|
||||||
|
&& echo 'UpdateChannel=$(shell cd $(SRCDIR) && bin/update/get_update_channel.py $(UPDATE_CONFIG))' \
|
||||||
&& echo 'ReferenceOOoMajorMinor=4.1' \
|
&& echo 'ReferenceOOoMajorMinor=4.1' \
|
||||||
&& echo 'UpdateID=$(PRODUCTNAME)_$(LIBO_VERSION_MAJOR)_en-US' \
|
&& echo 'UpdateID=$(PRODUCTNAME)_$(LIBO_VERSION_MAJOR)_en-US' \
|
||||||
&& echo 'UpdateURL=$(if $(ENABLE_ONLINE_UPDATE),http://update.libreoffice.org/check.php$(if $(filter-out WNT,$(OS)),?pkgfmt=$(PKGFORMAT)))' \
|
&& echo 'UpdateURL=$(if $(ENABLE_ONLINE_UPDATE),http://update.libreoffice.org/check.php$(if $(filter-out WNT,$(OS)),?pkgfmt=$(PKGFORMAT)))' \
|
||||||
|
Reference in New Issue
Block a user