From 8ef8f9fada7148e41154111779d997f97be3d4d3 Mon Sep 17 00:00:00 2001 From: Andrew Schwartzmeyer Date: Mon, 18 Jul 2016 10:00:46 -0700 Subject: [PATCH 1/3] Add GitHub token as insecure environment variable This should enable building via PR from forks. This token has read-only access to download the installer packages, but should nonetheless be revoked and replaced with a wget download when the repository goes public. --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 70c605a7c7..60dfd420ea 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,8 @@ matrix: - os: osx osx_image: xcode8 language: generic +env: + - GITHUB_TOKEN=a27573e27bea23fb05393ead69511b09e3b224be cache: directories: - $HOME/.dotnet From 0f7748a70bf37b417408c40edaee5f871d32f0a0 Mon Sep 17 00:00:00 2001 From: Andrew Schwartzmeyer Date: Mon, 18 Jul 2016 10:48:13 -0700 Subject: [PATCH 2/3] Add CentOS support --- tools/download.sh | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/tools/download.sh b/tools/download.sh index 8403642ca2..a632610cef 100755 --- a/tools/download.sh +++ b/tools/download.sh @@ -16,15 +16,27 @@ get_info() { # Get OS specific asset ID and package name case "$OSTYPE" in linux*) + source /etc/os-release + echo $ID # Install curl and wget to download package - sudo apt-get install -y curl wget - info=$(get_info deb) + case "$ID" in + centos*) + sudo yum install -y curl wget + info=$(get_info rpm) + ;; + ubuntu) + sudo apt-get install -y curl wget + info=$(get_info deb) + ;; + *) + exit 2 >&2 "$NAME is not supported!" + esac ;; darwin*) info=$(get_info pkg) ;; *) - exit 2 >&2 "$OSTYPE not supported!" + exit 2 >&2 "$OSTYPE is not supported!" ;; esac @@ -38,9 +50,19 @@ curl_ -H 'Accept: application/octet-stream' https://api.github.com/repos/PowerSh # Installs PowerShell package case "$OSTYPE" in linux*) + source /etc/os-release # Install dependencies - sudo apt-get install -y libunwind8 libicu52 - sudo dpkg -i ./$package + case "$ID" in + centos) + sudo yum install -y libicu libunwind + sudo yum install "./$package" + ;; + ubuntu) + sudo apt-get install -y libunwind8 libicu52 + sudo dpkg -i "./$package" + ;; + *) + esac ;; darwin*) sudo installer -pkg ./$package -target / From 49bd13b64221c42465e6f04e433018854ae93b35 Mon Sep 17 00:00:00 2001 From: Andrew Schwartzmeyer Date: Mon, 18 Jul 2016 10:11:04 -0700 Subject: [PATCH 3/3] Use os instead of matrix Travis is being picky about how this is specified. --- .travis.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 60dfd420ea..036ff22a6f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,12 +1,12 @@ language: cpp -matrix: - include: - - os: linux - dist: trusty - sudo: required - - os: osx - osx_image: xcode8 - language: generic + +os: + - linux + - osx +sudo: required +dist: trusty +osx_image: xcode8 + env: - GITHUB_TOKEN=a27573e27bea23fb05393ead69511b09e3b224be cache: