-
Notifications
You must be signed in to change notification settings - Fork 929
Version Switching Guide
Shwetha Gururaj edited this page May 17, 2024
·
7 revisions
The GA'd v7 cf CLI binary is named cf7
, and there is a symlink from cf
-> cf7
.
The GA'd v8 cf CLI binary is named cf8
, and there is a symlink from cf
-> cf8
.
Workflows that require switching between different versions of CLI can be scripted to accommodate utilizing binaries of the same name on a single computer.
Below you'll find instructions for each of the package managers we support.
- Assuming you've installed both wanted versions e.g. v7 and v8...
brew install cf-cli@7
brew install cf-cli@8
- Switch from v8 to v7:
brew unlink cf-cli@8 && brew unlink cf-cli@7 && brew link cf-cli@7 && cf version
- Switch from v7 to v8:
brew unlink cf-cli@7 && brew unlink cf-cli@8 && brew link cf-cli@8 && cf version
We're working on a robust soluiton that will faciliate more seamless switching via these package managers, but for now you must uninstall one version of the CLI and install the other version of the CLI to switch between them.
- Currently on v7, want to switch to v8:
- yum:
sudo yum remove cf7-cli && sudo yum install cf8-cli && cf version
- apt:
sudo apt-get remove cf7-cli && sudo apt-get install cf8-cli && cf version
- yum:
- Currently on v8, want to switch to v7:
- yum:
sudo yum remove cf8-cli && sudo yum install cf7-cli && cf version
- apt:
sudo apt-get remove cf8-cli && sudo apt-get install cf7-cli && cf version
- yum:
The following is a simple approach:
- Download the v7 and v8 binaries into separate directories
- Write a scipt that updates your
PATH
so it points to the binary for the version of the CLI you need to run:export PATH=/path/to/your/v7-or-v8/binary/:$PATH