Skip to content

Commit

Permalink
Rename it to xcversion (and 🎉)
Browse files Browse the repository at this point in the history
The name of the gem is left unchanged for now.
  • Loading branch information
mrcljx committed Oct 22, 2015
1 parent 2362780 commit c33a6a9
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 22 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ Install and update your Xcodes automatically.

```bash
$ gem install xcode-install
$ xcode-install install 6.3
$ xcversion install 6.3
```

## Installation

```bash
$ gem install xcode-install
$ gem install xcversion
```

## Usage
Expand All @@ -31,7 +31,7 @@ XCODE_INSTALL_PASSWORD
To list available versions:

```bash
$ xcode-install list
$ xcversion list
6.0.1
6.1
6.1.1
Expand All @@ -44,7 +44,7 @@ By default, only the latest major version is listed.
To install a certain version, simply:

```bash
$ xcode-install install 6.3
$ xcversion install 6.3
########################################################### 82.1%
######################################################################## 100.0%
Please authenticate for Xcode installation...
Expand All @@ -58,16 +58,16 @@ This will download and install that version of Xcode. It will also be automatica
Note: GMs and beta versions usually have special names, e.g.

```bash
$ xcode-install list
$ xcversion list
7 GM seed
7.1 beta
```

they have to be installed using the full name, e.g. `xcode-install install '7 GM seed'`.
they have to be installed using the full name, e.g. `xcversion install '7 GM seed'`.

### Command Line Tools

XcodeInstall can also install Xcode's Command Line Tools by calling `xcode-install install-cli-tools`.
XcodeInstall can also install Xcode's Command Line Tools by calling `xcversion install-cli-tools`.

## Limitations

Expand Down
17 changes: 5 additions & 12 deletions bin/xcode-install
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
#!/usr/bin/env ruby

if $PROGRAM_NAME == __FILE__
ENV['BUNDLE_GEMFILE'] = File.expand_path('../../Gemfile', __FILE__)
require 'rubygems'
require 'bundler/setup'
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
end

require 'xcode/install'

XcodeInstall::Command.run(ARGV)
#!/bin/bash
set -euo pipefail
>&2 echo 'DEPRECATED: `xcode-install` is now named `🎉` (or `xcversion`)'
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
exec $DIR/xcversion $@
12 changes: 12 additions & 0 deletions bin/xcversion
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env ruby

if $PROGRAM_NAME == __FILE__
ENV['BUNDLE_GEMFILE'] = File.expand_path('../../Gemfile', __FILE__)
require 'rubygems'
require 'bundler/setup'
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
end

require 'xcode/install'

XcodeInstall::Command.run(ARGV)
1 change: 1 addition & 0 deletions bin/🎉
2 changes: 1 addition & 1 deletion lib/xcode/install.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def install_dmg(dmgPath, suffix = '', switch = true, clean = true)
if source.nil?
out <<-HELP
No `Xcode.app` found in DMG. Please remove #{dmgPath} if you suspect a corrupted
download or run `xcode-install update` to see if the version you tried to install
download or run `xcversion update` to see if the version you tried to install
has been pulled by Apple. If none of this is true, please open a new GH issue.
HELP
$stderr.puts out.gsub("\n", ' ')
Expand Down
2 changes: 1 addition & 1 deletion lib/xcode/install/command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class Command < CLAide::Command
require 'xcode/install/update'

self.abstract_command = true
self.command = 'xcode-install'
self.command = 'xcversion'
self.version = VERSION
self.description = 'Xcode installation manager.'
end
Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
$LOAD_PATH.unshift((ROOT + 'lib').to_s)
$LOAD_PATH.unshift((ROOT + 'spec').to_s)

ENV['DELIVER_USER'] = 'xcode-install'
ENV['DELIVER_USER'] = 'xcversion'
ENV['DELIVER_PASSWORD'] = '12345password'

require 'bundler/setup'
Expand Down

0 comments on commit c33a6a9

Please sign in to comment.