Commit efe1e1bd authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm play k3s: implement install any version

parent 3bffd437
...@@ -25,14 +25,12 @@ case "$arch" in ...@@ -25,14 +25,12 @@ case "$arch" in
;; ;;
esac esac
# TODO: support for install any version if [ "$VERSION" = "*" ] ; then
#if [ "$VERSION" = "*" ] ; then # TODO: get latest version from somewhere?
#fi PKGURL="$(eget --list --latest https://github.com/k3s-io/k3s/releases "$file")"
else
PKGURL="$(eget --list --latest https://github.com/k3s-io/k3s/releases "$file")" PKGURL="https://github.com/k3s-io/k3s/releases/download/v$VERSION+k3s1/$file"
fi
#direct url:
#https://github.com/k3s-io/k3s/releases/download/v1.27.1-rc3%2Bk3s1/k3s
VERSION="$(echo "$PKGURL" | sed -e 's|.*download/v||' -e 's|%2Bk3s1.*||' -e 's|-.*||')" VERSION="$(echo "$PKGURL" | sed -e 's|.*download/v||' -e 's|%2Bk3s1.*||' -e 's|-.*||')"
epm pack --install $PKGNAME "$PKGURL" $VERSION epm pack --install $PKGNAME "$PKGURL" $VERSION
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment