Skip to content

Commit

Permalink
change install method for k8sgpt
Browse files Browse the repository at this point in the history
  • Loading branch information
Francesco Maria Cultrera committed Oct 14, 2023
1 parent 45e271f commit f9736d2
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/k8sgpt/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,21 @@ set -e
# `ensure_nanolayer` is a bash function that will find any existing nanolayer installations,
# and if missing - will download a temporary copy that automatically get deleted at the end
# of the script
ensure_nanolayer nanolayer_location "v0.5.0"
ensure_nanolayer nanolayer_location "v0.5.4"

$nanolayer_location install apt-get curl
# $nanolayer_location install apt-get curl

if [ "${VERSION}" = "latest" ] ; then
VERSION=$(curl -s https://api.github.com/repos/k8sgpt-ai/k8sgpt/releases/latest | grep "tag_name" | cut -d : -f 2,3 | tr -d \" | tr -d , | tr -d ' ')
fi

curl -LO https://github.com/k8sgpt-ai/k8sgpt/releases/download/${VERSION}/k8sgpt_amd64.deb
dpkg -i k8sgpt_amd64.deb
$nanolayer_location \
install \
devcontainer-feature \
"ghcr.io/devcontainers-contrib/features/gh-release:1.0.23" \
--option repo='k8sgpt-ai/k8sgpt' --option binaryNames='k8sgpt' --option version="$VERSION"

# curl -LO https://github.com/k8sgpt-ai/k8sgpt/releases/download/${VERSION}/k8sgpt_amd64.deb
# dpkg -i k8sgpt_amd64.deb

echo 'Done!'

0 comments on commit f9736d2

Please sign in to comment.