File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9595echo " version: $aptos_version "
9696
9797if [[ " $OSTYPE " == " linux-gnu" * || " $OSTYPE " == " freebsd" * || " $OSTYPE " == " cygwin" ]]; then
98- download_type=" Ubuntu-$HOSTTYPE "
98+ base_download_type=" Ubuntu-$HOSTTYPE "
99+
100+ # Check if the release has this asset
101+ asset_check=$( cat " $releases_path " | jq -r " .[] | select(${select_prerelease} and .tag_name==\" ${aptos_version} \" ) .assets | .[] | select(.name|test(\" ^${aptos_version} -${base_download_type} \" )) | .name" )
102+
103+ if [[ -z " $asset_check " ]]; then
104+ ubuntu_version=$( lsb_release -sr 2> /dev/null || echo " " )
105+ if [[ -n " $ubuntu_version " ]]; then
106+ download_type=" Ubuntu-${ubuntu_version} -$HOSTTYPE "
107+ else
108+ download_type=$base_download_type
109+ fi
110+ else
111+ download_type=$base_download_type
112+ fi
99113elif [[ " $OSTYPE " == " darwin" * ]]; then
100114 download_type=" MacOSX-$HOSTTYPE "
101115elif [[ " $OSTYPE " == " msys" || " $OSTYPE " == " win32" ]]; then
You can’t perform that action at this time.
0 commit comments