Skip to content

Commit

Permalink
Convert "latest" to version string
Browse files Browse the repository at this point in the history
  • Loading branch information
jgarber623-cargosense committed Oct 10, 2024
1 parent aeee380 commit 7f2f2dd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/google-cloud-cli/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.clou
apt-get update --yes

if [ "${GOOGLE_CLOUD_CLI_VERSION}" = "latest" ]; then
apt-get install --no-install-recommends --yes google-cloud-cli
else
apt-get install --no-install-recommends --yes google-cloud-cli="${GOOGLE_CLOUD_CLI_VERSION}"
GOOGLE_CLOUD_CLI_VERSION="$(apt show google-cloud-cli 2>/dev/null | sed -nr 's/version: (.+)/\1/ip' | tr -d '\r')"
fi

apt-get install --no-install-recommends --yes google-cloud-cli="${GOOGLE_CLOUD_CLI_VERSION}"

if [ -n "${curl_installed}" ]; then
apt purge curl --autoremove --yes
fi
Expand Down

0 comments on commit 7f2f2dd

Please sign in to comment.