diff --git a/assets/install b/assets/install index 9c49adb..ce106f7 100644 --- a/assets/install +++ b/assets/install @@ -152,10 +152,13 @@ i386) arch="x86" ;; esac # get latest version tag from github releases api -version=$(curl -s "https://api.github.com/repos/$repo/releases/latest" | grep '"tag_name":' | cut -d'"' -f4) +version=$(curl -s "https://api.github.com/repos/$repo/releases/latest" | jq -r .tag_name) [ -z "$version" ] && { - echo "failed to fetch $title latest version" - exit 1 + version=$(curl -s https://git.flow-control.dev/api/v1/repos/$repo/releases/latest | jq -r .tag_name) + [ -z "$version" ] && { + echo "failed to fetch $title latest version from github or flow-control.dev" + exit 1 + } } title="$title $version"