Provisioning: Upgrade Xcode to version 11.3.1 for macOS 10.14

Xcode 11.3.1 is the latest supported version for macOS 10.14
It seems that in macOS 10.14 xip-package can't be expanded
through mount. It need to be fetched first.

Pick-to: 6.0
Pick-to: 6.1
Change-Id: I8c53787a2edde6b50abc7ec099ecc10b7515df2e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
This commit is contained in:
Heikki Halmet
2021-03-22 13:59:48 +02:00
parent a5c2a8655d
commit 61d69b068f
3 changed files with 15 additions and 7 deletions

View File

@@ -2,7 +2,7 @@
#############################################################################
##
## Copyright (C) 2017 The Qt Company Ltd.
## Copyright (C) 2021 The Qt Company Ltd.
## Contact: http://www.qt.io/licensing/
##
## This file is part of the provisioning scripts of the Qt Toolkit.
@@ -33,6 +33,9 @@
##
#############################################################################
# shellcheck source=./../unix/DownloadURL.sh
source "${BASH_SOURCE%/*}/../unix/DownloadURL.sh"
# This script installs Xcode
# Prerequisites: Have Xcode prefetched to local cache as xz compressed.
# This can be achieved by fetching Xcode_8.xip from Apple Store.
@@ -52,7 +55,12 @@ function InstallXCode() {
if [[ $sourceFile =~ tar ]]; then
cd /Applications/ && sudo tar -zxf "$sourceFile"
elif [[ $sourceFile =~ "xip" ]]; then
cd /Applications/ && xip -x "$sourceFile"
if [[ $sourceFile =~ "http" ]]; then
Download $sourceFile /Applications/Xcode_$version.xip
cd /Applications/ && xip -x "Xcode_$version.xip"
else
cd /Applications/ && xip -x "$sourceFile"
fi
else
xzcat < "$sourceFile" | (cd /Applications/ && sudo cpio -dmi)
fi