From 37390763891d6c5f901e67543e33529d22deb3d2 Mon Sep 17 00:00:00 2001 From: Marc Khouzam Date: Wed, 19 Jun 2024 17:04:42 -0400 Subject: [PATCH] Document asdf package manager usage Signed-off-by: Marc Khouzam --- docs/quickstart/install.md | 49 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/docs/quickstart/install.md b/docs/quickstart/install.md index 646125980..c1a4aff8c 100644 --- a/docs/quickstart/install.md +++ b/docs/quickstart/install.md @@ -243,6 +243,55 @@ sudo yum install tanzu-cli-unstable To uninstall: `sudo yum remove tanzu-cli-unstable` +### asdf (MacOS and Linux) + +`asdf` is a tool version manager. It can be used to install the latest Tanzu CLI. +It also makes it easy to install and switch between different versions of the Tanzu CLI +(if you need to do that). Note that the latest released version of the Tanzu CLI is +always the recommended version, no matter what your backend version is. + +```console +asdf plugin add tanzu +asdf install tanzu latest +asdf global tanzu latest +``` + +To upgrade to a new release: `asdf install tanzu latest && asdf global tanzu latest` +Note that this installs the new latest version but does not remove any previously installed ones. + +To uninstall particular version: `asdf uninstall tanzu ` + +#### Installing a Specific Version + +`asdf` is made to make it easy to install a specific version: + +```console +asdf plugin add tanzu # if not done already + +asdf install tanzu +asdf global tanzu +``` + +It then becomes possible to switch between installed versions: + +```console +# For the entire machine +asdf global tanzu + +# For the current directory +asdf local tanzu + +# For the current shell +asdf shell tanzu +``` + +#### Installing a Pre-Release + +Pre-releases of the Tanzu CLI are made available to get early feedback before +a new version is released. Pre-releases are normal `asdf` packages and can +be installed the same way as official releases (see previous section). +Note that the special `latest` version does not include pre-releases. + ### Note on installation paths Package managers have opinions on locations to which binaries are installed.