From 25e383ffd7046649a1bb88e7e89b1d233a63d3a1 Mon Sep 17 00:00:00 2001 From: Harry Garrood Date: Thu, 12 Mar 2020 14:42:50 +0000 Subject: [PATCH 1/3] Fix fetching PureScript compiler tag in Travis Thanks to @thomashoneyman for the more reliable snippet. Co-authored-by: Thomas Honeyman --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 4cbd5fd..dc43f7e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ node_js: stable env: - PATH=$HOME/purescript:$PATH install: - - TAG=$(wget -q -O - https://github.com/purescript/purescript/releases/latest --server-response --max-redirect 0 2>&1 | sed -n -e 's/.*Location:.*tag\///p') + - TAG=$(basename $(curl -Ls -o /dev/null -w %{url_effective} https://github.com/purescript/purescript/releases/latest)) - wget -O $HOME/purescript.tar.gz https://github.com/purescript/purescript/releases/download/$TAG/linux64.tar.gz - tar -xvf $HOME/purescript.tar.gz -C $HOME/ - chmod a+x $HOME/purescript From 6c5dba12aa22ce4f3aeee7c88f3dbaa45cecfd5d Mon Sep 17 00:00:00 2001 From: Harry Garrood Date: Thu, 12 Mar 2020 14:47:16 +0000 Subject: [PATCH 2/3] Use curl instead of wget --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index dc43f7e..4c4356d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,7 @@ env: - PATH=$HOME/purescript:$PATH install: - TAG=$(basename $(curl -Ls -o /dev/null -w %{url_effective} https://github.com/purescript/purescript/releases/latest)) - - wget -O $HOME/purescript.tar.gz https://github.com/purescript/purescript/releases/download/$TAG/linux64.tar.gz + - curl --output $HOME/purescript.tar.gz https://github.com/purescript/purescript/releases/download/$TAG/linux64.tar.gz - tar -xvf $HOME/purescript.tar.gz -C $HOME/ - chmod a+x $HOME/purescript - npm install -g bower From 02dc28d0c8a26aa72b29394b0b30bc477850a14e Mon Sep 17 00:00:00 2001 From: Harry Garrood Date: Thu, 12 Mar 2020 14:59:04 +0000 Subject: [PATCH 3/3] use --location and use long options --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4c4356d..8daa38c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,8 +5,8 @@ node_js: stable env: - PATH=$HOME/purescript:$PATH install: - - TAG=$(basename $(curl -Ls -o /dev/null -w %{url_effective} https://github.com/purescript/purescript/releases/latest)) - - curl --output $HOME/purescript.tar.gz https://github.com/purescript/purescript/releases/download/$TAG/linux64.tar.gz + - TAG=$(basename $(curl --location --silent --output /dev/null -w %{url_effective} https://github.com/purescript/purescript/releases/latest)) + - curl --location --output $HOME/purescript.tar.gz https://github.com/purescript/purescript/releases/download/$TAG/linux64.tar.gz - tar -xvf $HOME/purescript.tar.gz -C $HOME/ - chmod a+x $HOME/purescript - npm install -g bower