Added script to update GS tools

Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
This commit is contained in:
Marcus Noble 2022-02-22 08:42:51 +00:00
parent 18bd3c0985
commit 8dcba62bee
Signed by: AverageMarcus
GPG Key ID: B8F2DB8A7AEBAF78

24
home/.bin/gs-update-tools Executable file
View File

@ -0,0 +1,24 @@
#!/usr/bin/env bash
set -e
echo "⬆️ Updating tools ⬆️"
echo
if which opsctl &>/dev/null ; then
printf "⏳ opsctl..."
opsctl version update --no-cache 1>/dev/null
printf "\n\e[1A\e[K✅ opsctl - %s\n" $(opsctl version | grep "^Version:" | awk -F' ' '{print $NF}')
fi
if which devctl &>/dev/null ; then
printf "⏳ devctl... "
devctl version update --no-cache 1>/dev/null
printf "\n\e[1A\e[K✅ devctl - %s\n" $(devctl version | grep "^Version:" | awk -F' ' '{print $NF}')
fi
if which kubectl-gs &>/dev/null ; then
printf "⏳ kubectl-gs... "
kubectl-gs selfupdate 1>/dev/null
printf "\n\e[1A\e[K✅ kubectl-gs - %s\n" $(kubectl-gs --version | awk -F' ' '{print $NF}')
fi