Code Monkey home page Code Monkey logo

xcode-install's Introduction

logo

xcpretty is a fast and flexible formatter for xcodebuild.
It does one thing, and it should do it well.

Gem version Build Status Code Climate Reviewed by Hound

Installation

$ gem install xcpretty

Usage

$ xcodebuild [flags] | xcpretty

xcpretty is designed to be piped with xcodebuild and thus keeping 100% compatibility with it. It's even a bit faster than xcodebuild itself, since it saves your terminal some prints.

Important: If you're running xcpretty on a CI like Travis or Jenkins, you may want to exit with same status code as xcodebuild. CI systems usually use status codes to determine if the build has failed.

$ set -o pipefail && xcodebuild [flags] | xcpretty
#
# OR
#
$ xcodebuild [flags] | xcpretty && exit ${PIPESTATUS[0]}

Raw xcodebuild output

You might want to use xcpretty together with tee to store the raw log in a file, and get the pretty output in the terminal. This might be useful if you want to inspect a failure in detail and aren't able to tell from the pretty output.

Here's a way of doing it:

$ xcodebuild [flags] | tee xcodebuild.log | xcpretty

Formats

ANSI / UTF-8

  • --[no-]color: Show build icons in color. (you can add it to --simple or --test format). Defaults to auto-detecting color availability.
  • --[no-]utf: Use unicode characters in build output or only ASCII. Defaults to auto-detecting the current locale.

Reporters

  • --report junit, -r junit: Creates a JUnit-style XML report at build/reports/junit.xml, compatible with Jenkins and TeamCity CI.

  • --report html, -r html: Creates a simple HTML report at build/reports/tests.html. xcpretty html

  • --report json-compilation-database, -r json-compilation-database: Creates a JSON compilation database at build/reports/compilation_db.json. This is a format to replay single compilations independently of the build system.

Writing a report to a custom path can be specified using --output PATH.

Extensions

xcpretty supports custom formatters through the use of the --formatter flag, which takes a path to a file as an argument. The file must contain a Ruby subclass of XCPretty::Formatter, and return that class at the end of the file. The class can override the format_* methods to hook into output parsing events.

Known extensions

The recommended format is a gem containing the formatter and named with an xcpretty- prefix, for easier discovery.

Team

xcode-install's People

Contributors

3lvis avatar ahanmal avatar aomathwift avatar endocrimes avatar freddi-kit avatar jpsim avatar jscott avatar keith avatar kelan avatar kenchan0130 avatar kesin11 avatar klaaspieter avatar krausefx avatar lacostej avatar lokst avatar manuyavuz avatar marcboquet avatar marcomorain avatar milch avatar mrcljx avatar neonichu avatar pietbrauer avatar revolter avatar rogerluan avatar salmanasiddiqui avatar sarahhodne avatar segiddins avatar snown avatar theoden9014 avatar timsutton avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xcode-install's Issues

Name change?

@KrauseFx was demanding that, because there's too much "install" in:

$ xcode-install install 7.0

Not really a fan of changing the command structure, because I think it is sensible, so the only way out would be a fancy name instead.

I'm open for ideas 😁

First time use fails

I just installed xcode-install
I use fastlane in some projects
I have several xcodes installed locally.

xcode-install install or list fail in the following way:

lacostej@Jeromes-MacBook-Pro ~/xxxx  xcode-install installed
6.0.1   (/Applications/Xcode6.0.1.app)
6.1.1   (/Applications/Xcode6.1.1.app)
6.2 (/Applications/Xcode6.2.app)
6.4 (/Applications/Xcode6.4.app)
lacostej@Jeromes-MacBook-Pro ~/xxxx  xcode-install install 6.3
/Users/lacostej/.rvm/gems/ruby-2.2.2/gems/spaceship-0.0.11/lib/spaceship/client.rb:160:in `login': No login data provided (Spaceship::Client::InvalidUserCredentialsError)
    from /Users/lacostej/.rvm/gems/ruby-2.2.2/gems/spaceship-0.0.11/lib/spaceship/client.rb:45:in `login'
    from /Users/lacostej/.rvm/gems/ruby-2.2.2/gems/spaceship-0.0.11/lib/spaceship.rb:31:in `login'
    from /Users/lacostej/.rvm/gems/ruby-2.2.2/gems/xcode-install-0.3.3/lib/xcode/install.rb:135:in `spaceship'
    from /Users/lacostej/.rvm/gems/ruby-2.2.2/gems/xcode-install-0.3.3/lib/xcode/install.rb:163:in `fetch_seedlist'
    from /Users/lacostej/.rvm/gems/ruby-2.2.2/gems/xcode-install-0.3.3/lib/xcode/install.rb:213:in `seedlist'
    from /Users/lacostej/.rvm/gems/ruby-2.2.2/gems/xcode-install-0.3.3/lib/xcode/install.rb:201:in `list_versions'
    from /Users/lacostej/.rvm/gems/ruby-2.2.2/gems/xcode-install-0.3.3/lib/xcode/install.rb:57:in `exist?'
    from /Users/lacostej/.rvm/gems/ruby-2.2.2/gems/xcode-install-0.3.3/lib/xcode/install/install.rb:29:in `validate!'
    from /Users/lacostej/.rvm/gems/ruby-2.2.2/gems/claide-0.8.2/lib/claide/command.rb:311:in `run'
    from /Users/lacostej/.rvm/gems/ruby-2.2.2/gems/xcode-install-0.3.3/bin/xcode-install:12:in `<top (required)>'
    from /Users/lacostej/.rvm/gems/ruby-2.2.2/bin/xcode-install:23:in `load'
    from /Users/lacostej/.rvm/gems/ruby-2.2.2/bin/xcode-install:23:in `<main>'
    from /Users/lacostej/.rvm/gems/ruby-2.2.2/bin/ruby_executable_hooks:15:in `eval'
    from /Users/lacostej/.rvm/gems/ruby-2.2.2/bin/ruby_executable_hooks:15:in `<main>'

Print location of the downloaded DMG

Took me a while to figure out that a downloaded DMGs are located in /Library/Caches/XcodeInstall. If --no-install is passed or the installation fails, it would be nice to print the dmg location so the user can find it and install it on their own easily.

"7 GM seed" required

Probably a good idea to specify in the README that if your xcode-install list looks like this:

➜  Dev  xcode-install list                                                
7 GM seed
7.1 beta

The correct install command would be: xcode-install install "7 GM seed" or "7.1 beta" and not xcode-install 7.1 as specified in the current README

Why are the installed Xcodes so huge?

$ du -shc Xcode*
5.9G    Xcode-6.2.app
5.9G    Xcode-6.3.app

but App Store versions are ~2.5GB - I guess using cp -R is the correct way to copy stuff over and symlinks, etc. are retained by it. Maybe hard links or something else that cp destroys?

Installing multiple versions of Xcode simultaneously installs wrong versions

I needed to install a few old versions of Xcode for testing old Swift versions. I fired off downloads for 6.0.1, 6.2 and 6.4 in different terminals, when they all finished I realized that it installed 6.0.1 3 times.

screen shot 2015-10-14 at 15 39 02

Not sure the cause of this but we should either fix it or warn that another job is happening before allowing an install.

Updating beta versions might lead to build failures due to remainings of a previous version

After updating to Xcode 7 beta 5 I had following build issue:

Module file was created by an older version of the compiler; rebuild 'Security' and try again: /Applications/Xcode-7.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/watchsimulator/i386/Security.swiftmodule

Security.swiftmodule was installed with a previous beta version but does not exist in the beta 5.
xcode-install uses ditto to install Xcode, which merges files from the source into existing directories at the destination path.
If a new (beta) version of Xcode doesn't contain files which were present in the previous version, the old files will still be there after installing the update.

Consider to automatically uninstall previous version at the destination path or to rename them before the install. If the install succeeded the old version can be deleted, but can still be used if the install failed.

Perform first-time setup

The goal here is to make it usable on a fresh CI server without manual intervention. Would appreciate if anyone already had something to quickly setup a completely fresh VM, maybe @DanielTomlinson or @pietbrauer?

  • Enable developer-mode
  • Accept license

`list` fails after initial install

It seems to fail because of bad credentials immediately after I installed it

β€£ xcode-install list                                                                                                                                                       master
/usr/local/opt/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spaceship-0.0.11/lib/spaceship/client.rb:160:in `login': No login data provided (Spaceship::Client::InvalidUserCredentialsError)
    from /usr/local/opt/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spaceship-0.0.11/lib/spaceship/client.rb:45:in `login'
    from /usr/local/opt/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spaceship-0.0.11/lib/spaceship.rb:31:in `login'
    from /usr/local/opt/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/xcode-install-0.3.3/lib/xcode/install.rb:135:in `spaceship'
    from /usr/local/opt/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/xcode-install-0.3.3/lib/xcode/install.rb:163:in `fetch_seedlist'
    from /usr/local/opt/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/xcode-install-0.3.3/lib/xcode/install.rb:213:in `seedlist'
    from /usr/local/opt/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/xcode-install-0.3.3/lib/xcode/install.rb:201:in `list_versions'
    from /usr/local/opt/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/xcode-install-0.3.3/lib/xcode/install.rb:108:in `list_current'
    from /usr/local/opt/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/xcode-install-0.3.3/lib/xcode/install/list.rb:22:in `run'
    from /usr/local/opt/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/claide-0.8.2/lib/claide/command.rb:312:in `run'
    from /usr/local/opt/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/xcode-install-0.3.3/bin/xcode-install:12:in `<top (required)>'
    from /usr/local/opt/rbenv/versions/2.2.2/bin/xcode-install:23:in `load'
    from /usr/local/opt/rbenv/versions/2.2.2/bin/xcode-install:23:in `<main>'

Accepting license "not authorized"

When running xcode-install install 7 on a fresh new OS X installation, I'm prompted for my password twice on the command line, then the following backtrace is logged:

2015-09-21 13:04:36.853 Xcode[410:6705] NSWindow warning: adding an unknown subview: <NSView: 0x7fef751085e0>
2015-09-21 13:04:36.890 Xcode[410:6705] Call stack:
(
    0   AppKit                              0x00007fff9a26d54d -[NSThemeFrame addSubview:] + 107
    1   AppKit                              0x00007fff9a29e7ce -[NSView replaceSubview:with:] + 153
    2   IDEKit                              0x0000000108fbcafe -[IDEFirstLaunchExperienceViewController _replaceView:withView:] + 176
    3   IDEKit                              0x0000000108fbb675 -[IDEFirstLaunchExperienceViewController showFirstLaunchExperienceModallyIfNecessary] + 181
    4   IDEKit                              0x00000001089ef067 -[IDEWelcomeWindowController _showFirstLaunchExperienceIfAppropriate] + 196
    5   IDEKit                              0x00000001089eef90 -[IDEWelcomeWindowController openWelcomeWindowAfterFirstLaunchExperienceIfAppropriate:] + 27
    6   IDEKit                              0x00000001089eecd4 -[IDEApplicationController applicationOpenUntitledFile:] + 230
    7   AppKit                              0x00007fff9a2c60fa -[NSApplication _doOpenUntitled] + 424
    8   AppKit                              0x00007fff9a2c5b81 __58-[NSApplication(NSAppleEventHandling) _handleAEOpenEvent:]_block_invoke + 252
    9   AppKit                              0x00007fff9a2c5949 __97-[NSDocumentController(NSInternal) _autoreopenDocumentsIgnoringExpendable:withCompletionHandler:]_block_invoke_3 + 140
    10  AppKit                              0x00007fff9a2c5491 -[NSDocumentController(NSInternal) _autoreopenDocumentsIgnoringExpendable:withCompletionHandler:] + 798
    11  AppKit                              0x00007fff9a2c3bb6 -[NSApplication _reopenWindowsAsNecessaryIncludingRestorableState:registeringAsReady:completionHandler:] + 331
    12  AppKit                              0x00007fff9a2c3939 -[NSApplication(NSAppleEventHandling) _handleAEOpenEvent:] + 561
    13  AppKit                              0x00007fff9a2c3385 -[NSApplication(NSAppleEventHandling) _handleCoreEvent:withReplyEvent:] + 244
    14  Foundation                          0x00007fff8fe6a818 -[NSAppleEventManager dispatchRawAppleEvent:withRawReply:handlerRefCon:] + 290
    15  IDEKit                              0x0000000108c23890 -[NSAppleEventManager(DVTAssertionOverrides) swizzleDispatchRawAppleEvent:withRawReply:handlerRefCon:] + 19
    16  Foundation                          0x00007fff8fe6a689 _NSAppleEventManagerGenericHandler + 102
    17  AE                                  0x00007fff910c843c _Z20aeDispatchAppleEventPK6AEDescPS_jPh + 531
    18  AE                                  0x00007fff910c81b9 _ZL25dispatchEventAndSendReplyPK6AEDescPS_ + 31
    19  AE                                  0x00007fff910c80c3 aeProcessAppleEvent + 295
    20  HIToolbox                           0x00007fff98b97c6e AEProcessAppleEvent + 56
    21  AppKit                              0x00007fff9a2bcda2 _DPSNextEvent + 2249
    22  AppKit                              0x00007fff9a2bbe58 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 346
    23  DVTKit                              0x0000000107db549b -[DVTApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 247
    24  AppKit                              0x00007fff9a2b1af3 -[NSApplication run] + 594
    25  AppKit                              0x00007fff9a22e244 NSApplicationMain + 1832
    26  libdyld.dylib                       0x00007fff8c2b35c9 start + 1
)

Then Xcode-7.app automatically launches, with the license agreement dialog box. Clicking "Agree" does nothing and logs the following warning every time:

2015-09-21 13:04:39.651 Xcode[410:6705] [MT] DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/IDEFrameworks/IDEFrameworks-8227/IDEKit/WelcomeWindow/IDELicenseAgreementViewController.m:176
Details:  Not authorized !
Object:   <IDELicenseAgreementViewController: 0x7fef7509f2d0>
Method:   -_agreeToLicense
Thread:   <NSThread: 0x7fef73c17300>{number = 1, name = main}
Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.

So I'm forced to hit control-c to exit the xcode-install process. I think it's at this point that the "install components" system dialog box appears (though this may have happened earlier, but just hidden).

At this point, launching Xcode re-prompts for accepting the license, which succeeds, and the components are installed automatically afterwards.

Allow downloading simulators

I believe this is a separate effort than #28 because the simulators aren't actually listed in the developer portal's "Downloads" section AFAIK.

image

Allow installation on a system without devtools

Currently, there are a few gems used which include C extensions:

$ find . -name '*.o'|cut -d/ -f5|sort|uniq
json-1.8.2
nokogiri-1.6.6.2
unf_ext-0.0.6
websocket-driver-0.5.4
  • nokogiri is going to be annoying to replace, it is used parse HTML of the DevCenter and also as a transitive dependency, I think.
  • websocket-driver is pulled in by fastlane_core's dependency on poltergeist.

Should be possible to πŸ”₯ the rest more easily

Unable to install ß6

This is what happens whenever I try to install Xcode 7 ß6.
I'll try to do a cleanup and try again but due to this tweet I opened this issue.

$ xcode-install install "7 beta 6" --verbose
dyld: Symbol not found: _OBJC_CLASS_$_DVTStreamingZip
  Referenced from: /Applications/Xcode-7.app/Contents/Developer/usr/bin/../../../Frameworks/IDEFoundation.framework/Versions/A/IDEFoundation
  Expected in: /Applications/Xcode-7.app/Contents/Developer/usr/bin/../../../SharedFrameworks/DVTFoundation.framework/Versions/A/DVTFoundation
 in /Applications/Xcode-7.app/Contents/Developer/usr/bin/../../../Frameworks/IDEFoundation.framework/Versions/A/IDEFoundation
/Users/<user>/.gem/ruby/2.2.0/gems/xcode-install-0.9.3/lib/xcode/install.rb:261:in `get_version': undefined method `split' for nil:NilClass (NoMethodError)
  from /Users/<user>/.gem/ruby/2.2.0/gems/xcode-install-0.9.3/lib/xcode/install.rb:254:in `initialize'
  from /Users/<user>/.gem/ruby/2.2.0/gems/xcode-install-0.9.3/lib/xcode/install.rb:69:in `new'
  from /Users/<user>/.gem/ruby/2.2.0/gems/xcode-install-0.9.3/lib/xcode/install.rb:69:in `block in installed_versions'
  from /Users/<user>/.gem/ruby/2.2.0/gems/xcode-install-0.9.3/lib/xcode/install.rb:69:in `map'
  from /Users/<user>/.gem/ruby/2.2.0/gems/xcode-install-0.9.3/lib/xcode/install.rb:69:in `installed_versions'
  from /Users/<user>/.gem/ruby/2.2.0/gems/xcode-install-0.9.3/lib/xcode/install.rb:65:in `installed?'
  from /Users/<user>/.gem/ruby/2.2.0/gems/xcode-install-0.9.3/lib/xcode/install/install.rb:34:in `validate!'
  from /Users/<user>/.gem/ruby/2.2.0/gems/claide-0.9.1/lib/claide/command.rb:311:in `run'
  from /Users/<user>/.gem/ruby/2.2.0/gems/xcode-install-0.9.3/bin/xcode-install:12:in `<top (required)>'
  from /Users/<user>/.gem/ruby/2.2.0/bin/xcode-install:23:in `load'
  from /Users/<user>/.gem/ruby/2.2.0/bin/xcode-install:23:in `<main>'

7.1 beta doesn't show up in `installed`

Reason is Spotlight things:

$ mdls /Applications/Xcode-7.1.app/|grep kMDItemCFBundleIdentifier

yields no output, so we cannot find it via Spotlight Β―_(ツ)_/Β―

Mac App Store shows update available for Xcode even though latest Xcode is installed

Mac App Store shows update available for Xcode even though latest Xcode is installed by xcode-install.

As this might be MAS bug, it would be nice to have a workaround for this so that MAS won't show a badge and update available for Xcode if the latest Xcode is already installed from xcode-install.

screen shot 2015-10-01 at 17 48 19

$ xcode-install installed
6.4 (/Applications/Xcode.app)
7.0.1   (/Applications/Xcode-7.0.1.app)

Install through ssh opens dialog but agree doesn't work

I tried installing the 7 beta 5 version trough a SSH session and it opened a license acceptation dialog, which I tried to accept through a VNC client connection. Accepting failed.

I would prefer

  1. for install through ssh to not open a dialog, but ask for the license to be accepted as when one runs sudo xcodebuild (and press ENTER in the terminal)
  2. if a dialog was opened, at least it should work. This problem may look to be Apple's as I get these in the console:
2015-08-19 14:54:56.295 Xcode[4012:12361752] [MT] DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/IDEFrameworks/IDEFrameworks-8190.6/IDEKit/WelcomeWindow/IDELicenseAgreementViewController.m:176
Details:  Not authorized !
Object:   <IDELicenseAgreementViewController: 0x7fa90413db20>
Method:   -_agreeToLicense
Thread:   <NSThread: 0x7fa901d19d80>{number = 1, name = main}
Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.

License not automatically accepted

Despite the change in #56 running successfully, I'm still getting prompted to accept the license when launching Xcode.app for the first time.

It'd be sweet to figure out exactly what clicking "Accept" in the GUI does so we could replicate it programmatically.

Determine if caching DevCenter information is still required

Originally, fetching info about available Xcode downloads was quite slow, but using Spaceship has improved that significantly. Let's benchmark and see if caching of that info does still make sense. If it doesn't, less code and improved UX πŸŽ‰

Cleanup of caches

  • Allow deleting DMGs, default should probably be to auto-delete after install
  • Allow refreshing state of the DevCenter

Binary release / Homebrew

Tools like this I feel are a much better fit being distributed via Homebrew, would you considering putting this up there?

It might also help the Gem dependency on C modules if a binary was distributed?

Fresh install of xcode-install won't run for me on El Capitan

Not sure how to describe it better, so here's the terminal output!

[patrick@Inigo] /Users/patrick$ sudo gem install xcode-install
Fetching: faraday-0.9.2.gem (100%)
Successfully installed faraday-0.9.2
Fetching: spaceship-0.3.4.gem (100%)
Successfully installed spaceship-0.3.4
Successfully installed xcode-install-0.9.6
Parsing documentation for faraday-0.9.2
Installing ri documentation for faraday-0.9.2
Parsing documentation for spaceship-0.3.4
Installing ri documentation for spaceship-0.3.4
Parsing documentation for xcode-install-0.9.6
3 gems installed

Ok, so that seemed good...

[patrick@Inigo] /Users/patrick$ xcode-install
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:2007:in `raise_if_conflicts': Unable to activate faraday_middleware-0.9.0, because faraday-0.9.2 conflicts with faraday (< 0.9, >= 0.7.4) (Gem::LoadError)
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:1176:in `activate'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:1212:in `block in activate_dependencies'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:1198:in `each'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:1198:in `activate_dependencies'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:1180:in `activate'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:1212:in `block in activate_dependencies'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:1198:in `each'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:1198:in `activate_dependencies'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:1180:in `activate'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_gem.rb:48:in `gem'
    from /usr/local/bin/xcode-install:22:in `<main>'

:(

Missing prompt for ADC username / password

There is no prompt for entering my credentials if i enter any xcode-install command. Just the description text:

❯❯ xcode-install list                                                                                                                                                                               [10:05:05 AM]
Please provide your Apple developer account credentials via the
XCODE_INSTALL_USER and XCODE_INSTALL_PASSWORD environment variables.

Install Xcode from a local DMG image or server URL

Hi,

Thanks for this tool, it looks really great.
Could you please add additional options such as:

  • installing from a local DMG image
xcode-install install /path/to/xcode.dmg
  • installing from a different URL
xcode-install install http://storage.server.com/xcode/xcode7.dmg

too meta

The gem depends on websocket-driver, which requires… xcode. lol.

Support all previous Xcode beta versions of this major release

Currently only Xcode 7 beta 4 is shown (after all the release versions of Xcode 6). It'd be great if you could also allow downloading older beta versions (in this case 1 through 3).

If you look at the url from the developer portal: https://developer.apple.com/services-account/download?path=/Developer_Tools/Xcode_7_beta_4/Xcode_7_beta_4.dmg you can see that it can be easily deduced that Apple uses a deterministic naming scheme. When I tried changing it to https://developer.apple.com/services-account/download?path=/Developer_Tools/Xcode_7_beta_3/Xcode_7_beta_3.dmg, it downloaded just fine (also worked for 2).

So I guess my feature suggestion is to support even unlisted beta versions by assuming that the naming scheme stays the same. If you ping the "made up" URL of the earlier betas, you can tell whether there is a resource or not, so you could even run through them in xcode-install list.

sh: /Applications/Xcode: No such file or directory

I've installed the application with ruby 2.2 and rbenv and I get the following error:

➜  ~  xcode-install install 6.4
sh: /Applications/Xcode: No such file or directory
/usr/local/opt/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/xcode-install-0.1.0/lib/xcode/install.rb:223:in `get_version': undefined method `split' for nil:NilClass (NoMethodError)
    from /usr/local/opt/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/xcode-install-0.1.0/lib/xcode/install.rb:216:in `initialize'
    from /usr/local/opt/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/xcode-install-0.1.0/lib/xcode/install.rb:92:in `new'
    from /usr/local/opt/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/xcode-install-0.1.0/lib/xcode/install.rb:92:in `block in installed_versions'
    from /usr/local/opt/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/xcode-install-0.1.0/lib/xcode/install.rb:92:in `map'
    from /usr/local/opt/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/xcode-install-0.1.0/lib/xcode/install.rb:92:in `installed_versions'
    from /usr/local/opt/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/xcode-install-0.1.0/lib/xcode/install.rb:88:in `installed?'
    from /usr/local/opt/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/xcode-install-0.1.0/lib/xcode/install/install.rb:25:in `validate!'
    from /usr/local/opt/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/claide-0.8.1/lib/claide/command.rb:311:in `run'
    from /usr/local/opt/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/xcode-install-0.1.0/bin/xcode-install:12:in `<top (required)>'
    from /usr/local/opt/rbenv/versions/2.2.0/bin/xcode-install:23:in `load'
    from /usr/local/opt/rbenv/versions/2.2.0/bin/xcode-install:23:in `<main>'
➜  ~  xcode-install list
sh: /Applications/Xcode: No such file or directory
/usr/local/opt/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/xcode-install-0.1.0/lib/xcode/install.rb:223:in `get_version': undefined method `split' for nil:NilClass (NoMethodError)
    from /usr/local/opt/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/xcode-install-0.1.0/lib/xcode/install.rb:216:in `initialize'
    from /usr/local/opt/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/xcode-install-0.1.0/lib/xcode/install.rb:92:in `new'
    from /usr/local/opt/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/xcode-install-0.1.0/lib/xcode/install.rb:92:in `block in installed_versions'
    from /usr/local/opt/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/xcode-install-0.1.0/lib/xcode/install.rb:92:in `map'
    from /usr/local/opt/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/xcode-install-0.1.0/lib/xcode/install.rb:92:in `installed_versions'
    from /usr/local/opt/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/xcode-install-0.1.0/lib/xcode/install.rb:189:in `list_versions'
    from /usr/local/opt/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/xcode-install-0.1.0/lib/xcode/install.rb:127:in `list_current'
    from /usr/local/opt/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/xcode-install-0.1.0/lib/xcode/install/list.rb:22:in `run'
    from /usr/local/opt/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/claide-0.8.1/lib/claide/command.rb:312:in `run'
    from /usr/local/opt/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/xcode-install-0.1.0/bin/xcode-install:12:in `<top (required)>'
    from /usr/local/opt/rbenv/versions/2.2.0/bin/xcode-install:23:in `load'
    from /usr/local/opt/rbenv/versions/2.2.0/bin/xcode-install:23:in `<main>'
➜  ~  ll /Applications/Xcode*
/Applications/Xcode 2.app:
total 0
drwxr-xr-x@ 16 romain  admin   544B 26 Feb 19:09 Contents

/Applications/Xcode-beta 4.app:
total 0
drwxr-xr-x@ 16 romain  admin   544B 20 Mar 01:57 Contents

/Applications/Xcode.app:
total 0
drwxr-xr-x  17 root  wheel   578B  8 Apr 22:09 Contents
➜  ~  ruby -v
ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-darwin14]

Any idea? Thanks!

Slow download

It looks that xcode-install is downloading 5x times slower the Xcode.dmg than Safari.

I run xcode-install install 7, and while it was downloading I checked in Activity Monitor to see the download speed. It was between 700KB/s - 1MB/s.

Then, while xcode-install was downloading the dmg, I started another download through Safari. Safari was downloading it with 5.6MB/s.

It looks that is a limitation of the curl command. To be able to do a multi-part download, would require to run several instances of curl at the same time for different file parts.

installed depends on spotlight

xcode-install installed depends on spotlight.

On my system, spotlight indexing was disabled on /, causing xcode-install not finding existing installs.

$ mdutil -sa
/:
    Indexing disabled.

One could consider using to print a warning if installed is used while indexing is off, e.g. by checking the output of

mdutil -s / | grep disabled

This isn't fool proof either, as after enabling indexing, there's a period in which indexing is on, but indexing isn't complete. I haven't found out how to check from the CLI that spotlight isn't done indexing.

Unable to list Xcode versions without provisioning profile

I have an account that is signed up for the developer program, but doesn't have a provisioning profile, and when I run xcode-install list I get this error:

/Library/Ruby/Gems/2.0.0/gems/fastlane_core-0.5.2/lib/fastlane_core/developer_center/developer_center_login.rb:55:in `rescue in login': There was no valid signing certificate found. Please log in and follow the 'Getting Started guide' on 'https://developer.apple.com/account/ios/profile/profileLanding.action' (RuntimeError)
    from /Library/Ruby/Gems/2.0.0/gems/fastlane_core-0.5.2/lib/fastlane_core/developer_center/developer_center_login.rb:49:in `login'
    from /Library/Ruby/Gems/2.0.0/gems/fastlane_core-0.5.2/lib/fastlane_core/developer_center/developer_center.rb:52:in `initialize'
    from /Library/Ruby/Gems/2.0.0/gems/xcode-install-0.3.2/lib/xcode/install.rb:178:in `new'
    from /Library/Ruby/Gems/2.0.0/gems/xcode-install-0.3.2/lib/xcode/install.rb:178:in `devcenter'
    from /Library/Ruby/Gems/2.0.0/gems/xcode-install-0.3.2/lib/xcode/install.rb:196:in `fetch_seedlist'
    from /Library/Ruby/Gems/2.0.0/gems/xcode-install-0.3.2/lib/xcode/install.rb:238:in `seedlist'
    from /Library/Ruby/Gems/2.0.0/gems/xcode-install-0.3.2/lib/xcode/install.rb:226:in `list_versions'
    from /Library/Ruby/Gems/2.0.0/gems/xcode-install-0.3.2/lib/xcode/install.rb:147:in `list_current'
    from /Library/Ruby/Gems/2.0.0/gems/xcode-install-0.3.2/lib/xcode/install/list.rb:22:in `run'
    from /Library/Ruby/Gems/2.0.0/gems/claide-0.8.1/lib/claide/command.rb:312:in `run'
    from /Library/Ruby/Gems/2.0.0/gems/xcode-install-0.3.2/bin/xcode-install:12:in `<top (required)>'
    from /usr/bin/xcode-install:23:in `load'
    from /usr/bin/xcode-install:23:in `<main>'

This shouldn't be necessary to download Xcode, as far as I can tell, so looks like this is a side effect of using FastLane?

install 6.3.2 GM seed issue

$ xcode-install list
6.0.1
6.1
6.1.1
6.2
6.3
6.3.1
6.3.2 GM seed
6.4 beta 2

then

$ xcode-install install "6.3.2 GM seed"
######################################################################## 100.0%
hdiutil: mount failed - image not recognized
Please authenticate for Xcode installation...
No `Xcode.app` found in DMG.

Setup default Xcode.app

With multiple Xcode installations xcode files are open with one of the Xcode installed (the last one installed). Would be nice if xcode-install allow tweak Finder setup to set current Xcode.app as default Xcode for the system. This would be companion to xcode-select where path to the active developer directory is updated.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.