Skip to content

Commit

Permalink
fix: detect & skip python install if not necessary (#85)
Browse files Browse the repository at this point in the history
Co-authored-by: Tan Le <[email protected]>
  • Loading branch information
fiadliel and tancnle authored Jan 10, 2024
1 parent a642c36 commit 81b5d2c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
- [Dependencies](#dependencies)
- [Install](#install)
- [Why?](#why)
- [Supported Versions](#supported-versions)
- [Default Cloud SDK Components](#default-cloud-sdk-components)
- [Contributing](#contributing)
- [License](#license)
Expand Down Expand Up @@ -53,6 +54,10 @@ The asdf config file, `.tool-versions`, allows pinning each tool in your project

When you update a version in `.tool-versions`, `asdf` will prompt all users who do not have the correct versions to upgrade. This enables whole teams to update their tools in unison.

# Supported Versions

gcloud releases from 352.0.0 and higher can be installed.

# Default Cloud SDK Components

`asdf-gcloud` can automatically install a set of Cloud SDK Components after each `asdf install gcloud <version>`. To enable this feature you must have a file that lists one COMPONENT_ID per line. For example:
Expand Down
6 changes: 5 additions & 1 deletion bin/install
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ install_gcloud() {
log_success "extracted!"

log_info "🚧 installing..."
"${ASDF_INSTALL_PATH}/install.sh" --usage-reporting=false --path-update=false --quiet
if [[ "${ASDF_INSTALL_VERSION}" > "352.0.0" ]]; then
"${ASDF_INSTALL_PATH}/install.sh" --usage-reporting=false --path-update=false --install-python=false --quiet
else
"${ASDF_INSTALL_PATH}/install.sh" --usage-reporting=false --path-update=false --quiet
fi
# test executable
test -x "${ASDF_INSTALL_PATH}/bin/gcloud" || log_failure_and_exit "Expected ${ASDF_INSTALL_PATH}/bin/gcloud to be executable."
log_success "gcloud ${ASDF_INSTALL_VERSION} installed!"
Expand Down

0 comments on commit 81b5d2c

Please sign in to comment.