From e5a3f6d18b10cfd90186868ee891e1ca5671f9bd Mon Sep 17 00:00:00 2001 From: Mark Tiedemann Date: Mon, 21 Jan 2019 16:39:45 +0100 Subject: [PATCH] Re-add CI for osx (#31) --- .travis.yml | 24 ++++++++++++++---------- install.sh | 2 +- install_test.sh | 2 +- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9c3939e..372570c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,7 +9,6 @@ matrix: python: - "2.7" - "3.3" - # Test the install script. script: - ./install.py - ./install_test.py @@ -20,18 +19,23 @@ matrix: addons: apt: packages: - - ksh - - zsh + - shellcheck env: - PATH=$HOME/bin/:$PATH - SHFMT_VERSION=v2.6.2 - - SHFMT_DOWNLOAD_URL="https://github.com/mvdan/sh/releases/download/${SHFMT_VERSION}/shfmt_${SHFMT_VERSION}_linux_amd64" before_script: - - $SHELL --version 2>/dev/null || dpkg -s "$SHELL" 2>/dev/null || command -v "$SHELL" - - curl --version - - shellcheck --version - - curl -sSL "$SHFMT_DOWNLOAD_URL" -o $HOME/bin/shfmt; - - chmod +x $HOME/bin/shfmt; - - shfmt --version + - curl -sSL -o "$HOME/bin/shfmt" "https://github.com/mvdan/sh/releases/download/${SHFMT_VERSION}/shfmt_${SHFMT_VERSION}_linux_amd64" + - chmod +x "$HOME/bin/shfmt" + script: + - ./install_test.sh + + - language: bash + os: + - osx + addons: + homebrew: + packages: + - shellcheck + - shfmt script: - ./install_test.sh diff --git a/install.sh b/install.sh index e833d53..a780de0 100755 --- a/install.sh +++ b/install.sh @@ -11,7 +11,7 @@ esac if [ $# -eq 0 ]; then deno_asset_path=$(curl -sSf https://github.com/denoland/deno/releases | - grep -o "/denoland/deno/releases/download/.*/deno_${os}_x64\.gz" | + grep -o "/denoland/deno/releases/download/.*/deno_${os}_x64\\.gz" | head -n 1) if [ ! "$deno_asset_path" ]; then exit 1; fi deno_uri="https://github.com${deno_asset_path}" diff --git a/install_test.sh b/install_test.sh index f666465..dd75325 100755 --- a/install_test.sh +++ b/install_test.sh @@ -6,7 +6,7 @@ set -ev shellcheck -s sh ./*.sh shfmt -d . -# Test we can install a specific version +# Test we can install a specific version. rm -rf ~/.deno ./install.sh v0.2.0 ~/.deno/bin/deno -v | grep -e 0.2.0