xcpretty / xcode-install

🔽 Install and update your Xcodes
https://fastlane.tools
MIT License
2.59k stars 239 forks source link

Allow specification of local network cache URL #269

Closed mattcroxson closed 1 year ago

mattcroxson commented 6 years ago

Preface: Please excuse my possibly horrid code; I am not a Ruby dev by trade and have little experience with it.

Brief

Our company uses fastlane extensively (including xcversion) in a distributed environment, with each developer provided their own Mac. As a result we use xcversion to install the same version of Xcode on multiple Macs, however the set up prevents "imaging" each device.

In order to prevent multiple downloads of Xcode (especially in the middle of the day when the office LAN is congested) we required the ability to "cache" Xcode DMG/XIP files in a central location. This PR provides the option to includes a base URL that contains these cached files.

Example Usage

Simply append --cache-url-base=[INSERT_URL] to the xcversion command, omitting the Xcode file name.

e.g. xcversion install 9.3 --cache-url-base=http://10.1.1.15/XcodeCache

Related

Possibly a solution for issue #198

jshier commented 6 years ago

It would be great to get this behavior and something like #259 combined and merged to allow installation from cached xip files, whether remote or local. I'd also like to use xcversion as part of an Xcode deploy script (using Ansible), but Apple's developer download servers aren't usually the best for performance.