From ea78079c574b8646128fdc24dd14667c30417f8f Mon Sep 17 00:00:00 2001 From: snowteamer <64228468+snowteamer@users.noreply.github.com> Date: Thu, 20 Oct 2022 16:32:07 +0200 Subject: [PATCH] Get rid of 'curl | sh' in travis.yml --- .travis.yml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1f7f47254..e6a1654fa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,13 +10,22 @@ branches: only: - master # https://github.com/okTurtles/group-income/issues/58 before_install: - # https://blog.travis-ci.com/2021-02-01-rundeno - - pwd - - curl -fsSL https://deno.land/x/install/install.sh | sh - - ls -l $HOME/.deno + - set -e + - deno_target="x86_64-unknown-linux-gnu" + - deno_version="v1.26.2" + - deno_uri="https://github.com/denoland/deno/releases/download/${deno_version}/deno-${deno_target}.zip" + - deno_install="${DENO_INSTALL:-$HOME/.deno}" + - deno_bin_dir="$deno_install/bin" + - deno_exe="$deno_bin_dir/deno" + - if [ ! -d "$deno_bin_dir" ]; then mkdir -p "$deno_bin_dir"; fi + - curl --fail --location --output "$deno_exe.zip" "$deno_uri" + - unzip -d "$deno_bin_dir" -o "$deno_exe.zip" + - chmod +x "$deno_exe" + - rm "$deno_exe.zip" + - echo "Deno was installed successfully to $deno_exe" - export DENO_INSTALL="$HOME/.deno" - export PATH="$DENO_INSTALL/bin:$PATH" - - deno run https://deno.land/std/examples/welcome.ts + - deno run https://deno.land/std/examples/welcome.ts cache: # Caches $HOME/.npm when npm ci is default script command # Caches node_modules in all other cases