Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use dl.deno.land to download binary file #44

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion bin/install
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ install_deno() {
local uncompress_command
local archive_file

local download_url="https://github.com/denoland/deno/releases/download"

if [[ $version > "0.35.0" ]]; then
case "$OSTYPE" in
darwin*) platform="apple-darwin" ;;
Expand All @@ -50,6 +52,10 @@ install_deno() {
archive_format="zip"
archive_file="deno-${architecture}-${platform}.${archive_format}"
uncompress_command="unzip -d ${install_path}/bin"

if ! [[ $version < "1.0.1" ]] || [[ $version = "1.0.0" ]]; then
download_url="https://dl.deno.land/release"
fi
else
case "$OSTYPE" in
darwin*) platform="osx" ;;
Expand All @@ -67,7 +73,7 @@ install_deno() {
uncompress_command="gunzip"
fi

local download_url="https://github.com/denoland/deno/releases/download/v${version}/${archive_file}"
download_url="${download_url}/v${version}/${archive_file}"
local source_path="${install_path}/bin/deno.${archive_format}"

echo "* Downloading and installing deno..."
Expand Down