Finish migration from summary.json to build_data.json

This commit is contained in:
Liru Færs
2019-12-18 00:00:22 -05:00
parent 10140d143c
commit 4798d1e3b3
2 changed files with 21 additions and 4 deletions

View File

@@ -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"
)

View File

@@ -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.