mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-13 17:14:02 +03:00
devops: fix chromium archiving with FILES.cfg (#6450)
- unset `IFS` variable so that it doesn't affect future script execution - use `\n\r` separator on windows - fix script to be Python2/Python3 compliant
This commit is contained in:
parent
45d92890af
commit
262824deb7
@ -59,12 +59,15 @@ function archive_compiled_chromium() {
|
||||
CHROMIUM_FOLDER_NAME="chrome-linux"
|
||||
# Run python script and convert output to array.
|
||||
IFS=$'\n' CHROMIUM_FILES_TO_ARCHIVE=($("${SCRIPT_PATH}/compute_files_to_archive.py" 64bit "${CR_CHECKOUT_PATH}/src/chrome/tools/build/linux/FILES.cfg"))
|
||||
unset IFS
|
||||
elif [[ $1 == "--compile-win32" ]]; then
|
||||
CHROMIUM_FOLDER_NAME="chrome-win"
|
||||
IFS=$'\n' CHROMIUM_FILES_TO_ARCHIVE=($("${SCRIPT_PATH}/compute_files_to_archive.py" 32bit "${CR_CHECKOUT_PATH}/src/chrome/tools/build/win/FILES.cfg"))
|
||||
IFS=$'\n\r' CHROMIUM_FILES_TO_ARCHIVE=($("${SCRIPT_PATH}/compute_files_to_archive.py" 32bit "${CR_CHECKOUT_PATH}/src/chrome/tools/build/win/FILES.cfg"))
|
||||
unset IFS
|
||||
elif [[ $1 == "--compile-win64" ]]; then
|
||||
CHROMIUM_FOLDER_NAME="chrome-win"
|
||||
IFS=$'\n' CHROMIUM_FILES_TO_ARCHIVE=($("${SCRIPT_PATH}/compute_files_to_archive.py" 64bit "${CR_CHECKOUT_PATH}/src/chrome/tools/build/win/FILES.cfg"))
|
||||
IFS=$'\n\r' CHROMIUM_FILES_TO_ARCHIVE=($("${SCRIPT_PATH}/compute_files_to_archive.py" 64bit "${CR_CHECKOUT_PATH}/src/chrome/tools/build/win/FILES.cfg"))
|
||||
unset IFS
|
||||
else
|
||||
echo "ERROR: unknown command, use --help for details"
|
||||
exit 1
|
||||
|
@ -4,15 +4,15 @@ import sys
|
||||
import json
|
||||
|
||||
if len(sys.argv) < 2:
|
||||
print "ERROR: expected arch: 32bit or 64bit"
|
||||
print("ERROR: expected arch: 32bit or 64bit")
|
||||
sys.exit(1)
|
||||
|
||||
if str(sys.argv[1]) == "--help" or str(sys.argv[1]) == "-h":
|
||||
print "Usage: read_files.py [32bit|64bit] <files.cfg path>"
|
||||
print("Usage: read_files.py [32bit|64bit] <files.cfg path>")
|
||||
sys.exit(1)
|
||||
|
||||
if len(sys.argv) < 3:
|
||||
print "ERROR: expected FILE.cfg path"
|
||||
print("ERROR: expected FILE.cfg path")
|
||||
sys.exit(1)
|
||||
|
||||
exclude_list = [
|
||||
|
Loading…
Reference in New Issue
Block a user