mirror of
git://code.qt.io/qt/qt5.git
synced 2026-02-01 19:36:04 +08:00
Version Xcode application bundle when provisioning macOS images
By versioning the Xcode installation we open up for having multiple Xcode versions installed on the same image in the future, which allows for e.g. choosing the Xcode version in the build config. By running xcode-select to choose the bundle, we ensure that build steps that do not know that Xcode has been versioned will still pick up the right compiler and SDK paths when e.g. running xcrun -find clang. Done-with: Jędrzej Nowacki <jedrzej.nowacki@qt.io> Change-Id: I0bd877bd344cebdd1fbf3a3035b00069f75c4c96 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This commit is contained in:
committed by
Liang Qi
parent
61ce2045be
commit
b5a989133a
@@ -55,6 +55,14 @@ function InstallXCode() {
|
||||
xzcat < "$sourceFile" | (cd /Applications/ && sudo cpio -dmi)
|
||||
fi
|
||||
|
||||
echo "Versioning application bundle"
|
||||
majorVersion=$(echo $version | cut -d '.' -f 1)
|
||||
versionedAppBundle="/Applications/Xcode${majorVersion}.app"
|
||||
sudo mv /Applications/Xcode.app ${versionedAppBundle}
|
||||
|
||||
echo "Selecting Xcode"
|
||||
sudo xcode-select --switch ${versionedAppBundle}
|
||||
|
||||
echo "Accept license"
|
||||
sudo xcodebuild -license accept
|
||||
|
||||
|
||||
Reference in New Issue
Block a user