From 58e9a5919952cbd0a5b2112bf5c72db09c4750ec Mon Sep 17 00:00:00 2001 From: Glenn Glazer Date: Mon, 16 May 2016 14:49:40 -0700 Subject: fix for maint-6413: add channel to summary.json --- indra/newview/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index bb745bcb43..5b39f622a6 100755 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1310,9 +1310,10 @@ source_group("CMake Rules" FILES ViewerInstall.cmake) # 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 +# channel added to summary.json for programmatic access to that by VMP SL-321 add_custom_target(generate_viewer_version ALL COMMAND printf '${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}' > ${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt - COMMAND printf '{"Type":"viewer","Version":"${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}"}' > ${CMAKE_BINARY_DIR}/summary.json + COMMAND printf '{"Type":"viewer","Version":"${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}","Channel":"${VIEWER_CHANNEL}"}' > ${CMAKE_BINARY_DIR}/summary.json COMMENT Generating viewer_version.txt for manifest processing ) -- cgit v1.2.3 From a382dcfb8dbc26fa7e73647bf996e9d166bfce6d Mon Sep 17 00:00:00 2001 From: Glenn Glazer Date: Tue, 17 May 2016 10:52:59 -0700 Subject: maint-6413: use file write as printf inserts escape chars --- indra/newview/CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 5b39f622a6..34e1565707 100755 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1310,13 +1310,14 @@ source_group("CMake Rules" FILES ViewerInstall.cmake) # 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 -# channel added to summary.json for programmatic access to that by VMP SL-321 add_custom_target(generate_viewer_version ALL COMMAND printf '${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}' > ${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt - COMMAND printf '{"Type":"viewer","Version":"${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}","Channel":"${VIEWER_CHANNEL}"}' > ${CMAKE_BINARY_DIR}/summary.json COMMENT Generating viewer_version.txt for manifest processing ) +#Channel added for VMP programmatic access. MAINT-6413/SL-321 +file(WRITE ${CMAKE_BINARY_DIR}/summary.json '{"Type":"viewer","Version":"${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}","Channel","${VIEWER_CHANNEL}"}') + set_source_files_properties( llversioninfo.cpp tests/llversioninfo_test.cpp PROPERTIES -- cgit v1.2.3 From e8773a72cb63f693b00100de4e02ab073f531b4f Mon Sep 17 00:00:00 2001 From: Glenn Glazer Date: Tue, 17 May 2016 16:05:37 -0700 Subject: maint-6413: use configure_file instead of write(file ...) --- indra/newview/CMakeLists.txt | 20 +++++++++++--------- indra/newview/summary.json.in | 5 +++++ 2 files changed, 16 insertions(+), 9 deletions(-) create mode 100644 indra/newview/summary.json.in (limited to 'indra/newview') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 34e1565707..c49321e906 100755 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1307,16 +1307,10 @@ set(viewer_HEADER_FILES source_group("CMake Rules" FILES ViewerInstall.cmake) -# 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 printf '${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}' > ${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt - COMMENT Generating viewer_version.txt for manifest processing - ) - #Channel added for VMP programmatic access. MAINT-6413/SL-321 -file(WRITE ${CMAKE_BINARY_DIR}/summary.json '{"Type":"viewer","Version":"${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}","Channel","${VIEWER_CHANNEL}"}') +set(SUMMARY_VERSION "${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}") +set(SUMMARY_CHANNEL "${VIEWER_CHANNEL}") +configure_file(summary.json.in ${CMAKE_BINARY_DIR}/summary.json @ONLY) set_source_files_properties( llversioninfo.cpp tests/llversioninfo_test.cpp @@ -1325,6 +1319,14 @@ set_source_files_properties( COMPILE_DEFINITIONS "${VIEWER_CHANNEL_VERSION_DEFINES}" # see BuildVersion.cmake ) +# 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 printf '${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}' > ${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt + COMMENT Generating viewer_version.txt for manifest processing + ) + if (DARWIN) LIST(APPEND viewer_SOURCE_FILES llappviewermacosx.cpp) LIST(APPEND viewer_SOURCE_FILES llappviewermacosx-objc.mm) diff --git a/indra/newview/summary.json.in b/indra/newview/summary.json.in new file mode 100644 index 0000000000..e33cc2b7e7 --- /dev/null +++ b/indra/newview/summary.json.in @@ -0,0 +1,5 @@ +{ +"Type":"viewer", +"Version":"@SUMMARY_VERSION@", +"Channel":"@SUMMARY_CHANNEL@" +} -- cgit v1.2.3 From 8c458778717666c7be7c6e0f0b19f28deb54b50f Mon Sep 17 00:00:00 2001 From: Glenn Glazer Date: Mon, 23 May 2016 12:05:53 -0700 Subject: backout 354345 --- indra/newview/CMakeLists.txt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index c49321e906..334a21a12e 100755 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1307,10 +1307,9 @@ set(viewer_HEADER_FILES source_group("CMake Rules" FILES ViewerInstall.cmake) -#Channel added for VMP programmatic access. MAINT-6413/SL-321 -set(SUMMARY_VERSION "${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}") -set(SUMMARY_CHANNEL "${VIEWER_CHANNEL}") -configure_file(summary.json.in ${CMAKE_BINARY_DIR}/summary.json @ONLY) +# 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 set_source_files_properties( llversioninfo.cpp tests/llversioninfo_test.cpp -- cgit v1.2.3 From 9c28c06f1da98ba42d4d5546a2b2cdb7b042c13e Mon Sep 17 00:00:00 2001 From: Glenn Glazer Date: Mon, 23 May 2016 12:08:59 -0700 Subject: backout 354346 / e63c00cf654a and 354347 / e4bfe3ee05a6 --- indra/newview/CMakeLists.txt | 13 +++++-------- indra/newview/summary.json.in | 5 ----- 2 files changed, 5 insertions(+), 13 deletions(-) delete mode 100644 indra/newview/summary.json.in (limited to 'indra/newview') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 334a21a12e..4412b06d38 100755 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1310,6 +1310,11 @@ source_group("CMake Rules" FILES ViewerInstall.cmake) # 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 printf '${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}' > ${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt + COMMENT Generating viewer_version.txt for manifest processing + ) + set_source_files_properties( llversioninfo.cpp tests/llversioninfo_test.cpp @@ -1318,14 +1323,6 @@ set_source_files_properties( COMPILE_DEFINITIONS "${VIEWER_CHANNEL_VERSION_DEFINES}" # see BuildVersion.cmake ) -# 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 printf '${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}' > ${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt - COMMENT Generating viewer_version.txt for manifest processing - ) - if (DARWIN) LIST(APPEND viewer_SOURCE_FILES llappviewermacosx.cpp) LIST(APPEND viewer_SOURCE_FILES llappviewermacosx-objc.mm) diff --git a/indra/newview/summary.json.in b/indra/newview/summary.json.in deleted file mode 100644 index e33cc2b7e7..0000000000 --- a/indra/newview/summary.json.in +++ /dev/null @@ -1,5 +0,0 @@ -{ -"Type":"viewer", -"Version":"@SUMMARY_VERSION@", -"Channel":"@SUMMARY_CHANNEL@" -} -- cgit v1.2.3 From 999a949b52b50d5330c717fde19af3931e256f11 Mon Sep 17 00:00:00 2001 From: Glenn Glazer Date: Mon, 23 May 2016 13:49:26 -0700 Subject: debug version args --- indra/newview/CMakeLists.txt | 9 +-------- indra/newview/viewer_manifest.py | 3 +++ 2 files changed, 4 insertions(+), 8 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 4412b06d38..6734f62137 100755 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1307,14 +1307,7 @@ set(viewer_HEADER_FILES source_group("CMake Rules" FILES ViewerInstall.cmake) -# 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 printf '${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}' > ${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt - COMMENT Generating viewer_version.txt for manifest processing - ) - +#summary.json creation moved to viewer_manifest.py MAINT-6413 set_source_files_properties( llversioninfo.cpp tests/llversioninfo_test.cpp diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 1c77cf805e..6365de0024 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -122,6 +122,9 @@ class ViewerManifest(LLManifest): settings_install['CmdLineGridChoice']['Value'] = self.grid() print "Set CmdLineGridChoice in settings_install.xml to '%s'" % self.grid() + #COYOT: channel: self.channel_with_pkg_suffix() + print "COYOT: version %s" % '.'.join(self.args['version']) + # put_in_file(src=) need not be an actual pathname; it # only needs to be non-empty self.put_in_file(llsd.format_pretty_xml(settings_install), -- cgit v1.2.3 From ce760e80c492d1c3e13306a1d06aa734b4d829a9 Mon Sep 17 00:00:00 2001 From: Glenn Glazer Date: Tue, 24 May 2016 11:43:57 -0700 Subject: MAINT-6413: write summary.json from viewer_manifest.py, remove facility from cmake --- indra/newview/CMakeLists.txt | 5 +++++ indra/newview/viewer_manifest.py | 15 ++++++++++----- 2 files changed, 15 insertions(+), 5 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 6734f62137..64b7ff34f6 100755 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1308,6 +1308,11 @@ set(viewer_HEADER_FILES source_group("CMake Rules" FILES ViewerInstall.cmake) #summary.json creation moved to viewer_manifest.py MAINT-6413 +# the viewer_version.txt file created here is for passing to viewer_manifest and autobuild +add_custom_target(generate_viewer_version ALL + COMMAND printf '${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}' > ${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt + COMMENT Generating viewer_version.txt for manifest processing + ) set_source_files_properties( llversioninfo.cpp tests/llversioninfo_test.cpp diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 6365de0024..f3d89bb866 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -30,6 +30,7 @@ import sys import os.path import shutil import errno +import json import re import tarfile import time @@ -122,9 +123,6 @@ class ViewerManifest(LLManifest): settings_install['CmdLineGridChoice']['Value'] = self.grid() print "Set CmdLineGridChoice in settings_install.xml to '%s'" % self.grid() - #COYOT: channel: self.channel_with_pkg_suffix() - print "COYOT: version %s" % '.'.join(self.args['version']) - # put_in_file(src=) need not be an actual pathname; it # only needs to be non-empty self.put_in_file(llsd.format_pretty_xml(settings_install), @@ -184,9 +182,16 @@ class ViewerManifest(LLManifest): self.path("*.tga") self.end_prefix("local_assets") - # Files in the newview/ directory + # File in the newview/ directory self.path("gpu_table.txt") - # The summary.json file gets left in the build directory by newview/CMakeLists.txt. + + #summary.json. Standard with exception handling is fine. If we can't open a new file for writing, we have worse problems + summary_dict = {"Type":"viewer","Version":'.'.join(self.args['version']),"Channel":self.channel_with_pkg_suffix()} + with open(os.path.join(os.pardir,'summary.json'), 'w') as summary_handle: + json.dump(summary_dict,summary_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, "summary.json"): print "No summary.json file" -- cgit v1.2.3