Skip to content

Commit 1ea0bb6

Browse files
committed
Get rid of 'curl | sh' in travis.yml
1 parent b937be3 commit 1ea0bb6

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

.travis.yml

+14-5
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,22 @@ branches:
1010
only:
1111
- master # https://github.com/okTurtles/group-income/issues/58
1212
before_install:
13-
# https://blog.travis-ci.com/2021-02-01-rundeno
14-
- pwd
15-
- curl -fsSL https://deno.land/x/install/install.sh | sh
16-
- ls -l $HOME/.deno
13+
- set -e
14+
- deno_target="x86_64-unknown-linux-gnu"
15+
- deno_version="v1.26.2"
16+
- deno_uri="https://github.com/denoland/deno/releases/download/${deno_version}/deno-${deno_target}.zip"
17+
- deno_install="${DENO_INSTALL:-$HOME/.deno}"
18+
- deno_bin_dir="$deno_install/bin"
19+
- deno_exe="$deno_bin_dir/deno"
20+
- if [ ! -d "$deno_bin_dir" ]; then mkdir -p "$deno_bin_dir"; fi
21+
- curl --fail --location --output "$deno.exe.zip" "$deno_uri"
22+
- unzip -d "$deno_bin_dir" -o "$deno_exe.zip"
23+
- chmod +x "$deno_exe"
24+
- rm "$deno_exe.zip"
25+
- echo "Deno was installed successfully to $deno_exe"
1726
- export DENO_INSTALL="$HOME/.deno"
1827
- export PATH="$DENO_INSTALL/bin:$PATH"
19-
- deno run https://deno.land/std/examples/welcome.ts
28+
- deno run https://deno.land/std/examples/welcome.ts
2029
cache:
2130
# Caches $HOME/.npm when npm ci is default script command
2231
# Caches node_modules in all other cases

0 commit comments

Comments
 (0)