Skip to content

Commit

Permalink
Change the download URL
Browse files Browse the repository at this point in the history
  • Loading branch information
pepicrft committed Oct 31, 2023
1 parent 68f6b11 commit 984b675
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion bin/download
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ 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"
release_file="$ASDF_DOWNLOAD_PATH/$TOOL_NAME-$ASDF_INSTALL_VERSION.zip"

# Download tar.gz file to the download directory
download_release "$ASDF_INSTALL_VERSION" "$release_file"
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 tuist.
GH_REPO="https://github.com/tuist/tuist"
TOOL_NAME="tuist"
TOOL_TEST="tuist --help"
Expand All @@ -14,7 +13,6 @@ fail() {

curl_opts=(-fsSL)

# NOTE: You might want to remove this if tuist is not hosted on GitHub releases.
if [ -n "${GITHUB_API_TOKEN:-}" ]; then
curl_opts=("${curl_opts[@]}" -H "Authorization: token $GITHUB_API_TOKEN")
fi
Expand All @@ -41,8 +39,7 @@ download_release() {
version="$1"
filename="$2"

# TODO: Adapt the release URL convention for tuist
url="$GH_REPO/archive/v${version}.tar.gz"
url="$GH_REPO/releases/download/${version}/tuist.zip"

echo "* Downloading $TOOL_NAME release $version..."
curl "${curl_opts[@]}" -o "$filename" -C - "$url" || fail "Could not download $url"
Expand Down

0 comments on commit 984b675

Please sign in to comment.