[provisioning] Make sure nothing can block Xcode mv (#5943)

The device tests would often fail on bots with the following:

```
Extracting /tmp/x-provisioning/Xcode_10.2.xip...
Archive Utility[4964:12156830] Persistent UI failed to open file file:///Users/xamarinqa/Library/Saved%20Application%20State/com.apple.archiveutility.savedState/window_2.data: No such file or directory (2)
Installing Xcode 10.2 to /Applications/Xcode102.app...
mv: rename Xcode.app to /Applications/Xcode102.app: Not a directory
```

This is because we might have an Xcode symlink already at the destination location. The simple fix is to always make sure the destination is clean before moving the extracted Xcode to it.
This commit is contained in:
Vincent Dondain 2019-04-23 16:55:59 -04:00 коммит произвёл GitHub
Родитель df85569d23
Коммит 5832f4a3ba
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 1 добавлений и 0 удалений

Просмотреть файл

@ -345,6 +345,7 @@ function install_specific_xcode () {
cd $PROVISION_DOWNLOAD_DIR
# make sure there's nothing interfering
rm -Rf *.app
rm -Rf $XCODE_ROOT
# extract
/System/Library/CoreServices/Applications/Archive\ Utility.app/Contents/MacOS/Archive\ Utility "$XCODE_DMG"
log "Installing Xcode $XCODE_VERSION to $XCODE_ROOT..."