Skip to content
This repository has been archived by the owner on Apr 3, 2021. It is now read-only.

kylef-archive/podenv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pod Version Manager

podenv allows you to easily install, and switch between multiple versions of CocoaPods, without managing Ruby.

podenv screenshot

podenv allows you to:

  • Change the global CocoaPods version, per user.
  • Set a per-project CocoaPods version.
  • Allows you to override the CocoaPods version with an environmental variable.

Installation

Via Homebrew

You can install podenv using the Homebrew package manager.

$ brew install kylef/formulae/podenv

Via a Git clone

  1. Check out podenv, we recommend ~/.podenv (but it can be installed elsewhere as long as you set PODENV_ROOT).

    $ git clone https://github.com/kylef/podenv.git ~/.podenv
  2. Configure environment.

    For Bash:

    $ echo 'export PATH="$HOME/.podenv/bin:$PATH"' >> ~/.bash_profile

    For ZSH:

    $ echo 'export PATH="$HOME/.podenv/bin:$PATH"' >> ~/.zshenv

    For Fish:

    $ echo 'setenv PATH "$HOME/.podenv/bin" $PATH' >> ~/.config/fish/config.fish
  3. Restart your shell so the changes take effect.

Usage

Getting Started

Once you've installed podenv, you can install a specific version of CocoaPods using the install command:

$ podenv install 1.0.0.beta.2

Alternatively, you can install the version specified in the local Podfile.lock file using the following:

$ podenv install

Then you can continue to use CocoaPods as you normally would, podenv which automatically switch to the correct version locked from your Podfile.lock when you run it.

$ pod --version
1.0.0.beta.2

Commands

version

Displays the current active CocoaPods version and why it was chosen.

$ podenv version
0.39.0 (set by Podfile.lock)
versions

Lists all installed CocoaPods versions, showing an asterisk next to the currently active version.

$ podenv versions
* 0.39.0 (set by Podfile.lock)
  1.0.0.beta.2
global

Sets the global version of CocoaPods to be used by writing to the ~/.podenv/version file. This version can be overridden by application-specific Podfilefile, or by setting the COCOAPODS_VERSION environment variable.

$ podenv global 1.0.0.beta.2
$ podenv global
1.0.0.beta.2
install

Installs a version of CocoaPods.

$ podenv install 1.0.0.beta.2
Listing all available versions
$ podenv install --list
1.0.0.beta.2
1.0.0.beta.1
0.39.0
0.39.0.rc.1
...
Installing Unreleased Versions

It's also possible to install directly from a branch found on the CocoaPods repository:

$ podenv install --branch 0.39-stable

The version inside podenv will be the branch name, for example 0.39-stable.

You can explicitly use this version via the environ variable, for example:

$ env COCOAPODSPOD_VERSION=0.39-stable pod

NOTE: You may also use --repo to install from a different GitHub remote.

uninstall

Uninstalls a specific CocoaPods version.

$ podenv uninstall 1.0.0.beta.2
exec

Runs an executable with the selected CocoaPods version. For example, this can be used to install CocoaPods plugins.

$ podenv exec gem install cocoapods-bugsnag

Packages

No packages published

Languages