Skip to content

Commit

Permalink
feat: remove TODOs and make downloaded binary executable
Browse files Browse the repository at this point in the history
  • Loading branch information
johnmartel committed Jan 16, 2024
1 parent 629b06e commit 2ce40fa
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
1 change: 0 additions & 1 deletion bin/download
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 1 addition & 4 deletions lib/utils.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
}
Expand All @@ -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..."
Expand All @@ -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!"
Expand Down

0 comments on commit 2ce40fa

Please sign in to comment.