diff --git a/bin/download b/bin/download index c11ee53..38c6411 100755 --- a/bin/download +++ b/bin/download @@ -10,7 +10,6 @@ source "${plugin_dir}/lib/utils.bash" mkdir -p "$ASDF_DOWNLOAD_PATH" -# TODO: Adapt this to proper extension and adapt extracting strategy. release_file="$ASDF_DOWNLOAD_PATH/$TOOL_NAME-$ASDF_INSTALL_VERSION.tar.gz" # Download tar.gz file to the download directory diff --git a/lib/utils.bash b/lib/utils.bash index 1a5f30e..de8be70 100644 --- a/lib/utils.bash +++ b/lib/utils.bash @@ -2,7 +2,6 @@ set -euo pipefail -# TODO: Ensure this is the correct GitHub homepage where releases can be downloaded for shorebird. GH_REPO="https://github.com/shorebirdtech/shorebird" TOOL_NAME="shorebird" TOOL_TEST="shorebird --version" @@ -31,7 +30,6 @@ list_github_tags() { } list_all_versions() { - # TODO: Adapt this. By default we simply list the tag names from GitHub releases. # Change this function if shorebird has other means of determining installable versions. list_github_tags } @@ -41,7 +39,6 @@ download_release() { version="$1" filename="$2" - # TODO: Adapt the release URL convention for shorebird url="$GH_REPO/archive/v${version}.tar.gz" echo "* Downloading $TOOL_NAME release $version..." @@ -61,9 +58,9 @@ install_version() { mkdir -p "$install_path" cp -r "$ASDF_DOWNLOAD_PATH"/* "$install_path" - # TODO: Assert shorebird executable exists. local tool_cmd tool_cmd="$(echo "$TOOL_TEST" | cut -d' ' -f1)" + chmod +x "$install_path/$tool_cmd" test -x "$install_path/$tool_cmd" || fail "Expected $install_path/$tool_cmd to be executable." echo "$TOOL_NAME $version installation was successful!"