diff --git a/zinit-install.zsh b/zinit-install.zsh index 531f5299d..72d4c2d20 100644 --- a/zinit-install.zsh +++ b/zinit-install.zsh @@ -354,7 +354,13 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || { ( if [[ $site = */releases ]] { - local url=$site/${ICE[ver]} + local tag_version=${ICE[ver]} + if [[ -z $tag_version ]]; then + tag_version="$( { .zinit-download-file-stdout $site/latest || .zinit-download-file-stdout $site/latest 1; } 2>/dev/null | \ + command grep -m1 -o 'href=./'$user'/'$plugin'/releases/tag/[^"]\+')" + tag_version=${tag_version##*/} + fi + local url=$site/expanded_assets/$tag_version .zinit-get-latest-gh-r-url-part "$user" "$plugin" "$url" || return $? @@ -1456,7 +1462,14 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || { local user=$1 plugin=$2 urlpart=$3 if [[ -z $urlpart ]] { - local url=https://github.com/$user/$plugin/releases/$ICE[ver] + local tag_version=${ICE[ver]} + if [[ -z $tag_version ]]; then + local releases_url=https://github.com/$user/$plugin/releases/latest + tag_version="$( { .zinit-download-file-stdout $releases_url || .zinit-download-file-stdout $releases_url 1; } 2>/dev/null | \ + command grep -m1 -o 'href=./'$user'/'$plugin'/releases/tag/[^"]\+')" + tag_version=${tag_version##*/} + fi + local url=https://github.com/$user/$plugin/releases/expanded_assets/$tag_version } else { local url=https://$urlpart }