From 4798d1e3b39cc9319476645828962d7cd5cc2abe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Wed, 18 Dec 2019 00:00:22 -0500 Subject: [PATCH] Finish migration from summary.json to build_data.json --- indra/newview/CMakeLists.txt | 2 +- indra/newview/viewer_manifest.py | 23 ++++++++++++++++++++--- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 75e119645..b727053f3 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1162,12 +1162,12 @@ set(viewer_HEADER_FILES source_group("CMake Rules" FILES ViewerInstall.cmake) +#build_data.json creation moved to viewer_manifest.py MAINT-6413 # the viewer_version.txt file created here is for passing to viewer_manifest and autobuild # the summary.json file is created for the benefit of the TeamCity builds, where # it is used to provide descriptive information to the build results page add_custom_target(generate_viewer_version ALL COMMAND ${CMAKE_COMMAND} -E echo ${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION} > ${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt - COMMAND ${CMAKE_COMMAND} -E echo {"Type":"viewer","Version":"${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}"} > ${CMAKE_BINARY_DIR}/summary.json COMMENT "Generating viewer_version.txt for manifest processing" ) diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 94f51e662..a02d691b1 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -135,9 +135,24 @@ class ViewerManifest(LLManifest): # File in the newview/ directory self.path("gpu_table.txt") - # The summary.json file gets left in the build directory by newview/CMakeLists.txt. - if not self.path2basename(os.pardir, "summary.json"): - print "No summary.json file" + + #build_data.json. Standard with exception handling is fine. If we can't open a new file for writing, we have worse problems + #platform is computed above with other arg parsing + build_data_dict = {"Type":"viewer","Version":'.'.join(self.args['version']), + "Channel Base": CHANNEL_VENDOR_BASE, + "Channel":self.channel_with_pkg_suffix(), + "Platform":self.build_data_json_platform, + "Address Size":self.address_size, + "Update Service":"https://app.alchemyviewer.org/update", + } + build_data_dict = self.finish_build_data_dict(build_data_dict) + with open(os.path.join(os.pardir,'build_data.json'), 'w') as build_data_handle: + json.dump(build_data_dict,build_data_handle) + + #we likely no longer need the test, since we will throw an exception above, but belt and suspenders and we get the + #return code for free. + if not self.path2basename(os.pardir, "build_data.json"): + print "No build_data.json file" def standalone(self): return self.args['standalone'] == "ON" @@ -1140,6 +1155,8 @@ class DarwinManifest(ViewerManifest): self.remove(sparsename) class LinuxManifest(ViewerManifest): + build_data_json_platform = 'lnx' + def is_packaging_viewer(self): super(LinuxManifest, self).is_packaging_viewer() return True # We always want a packaged viewer even without archive.