mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Merge pull request #1406 from andschwa/andschwa/travis-fork
Add GitHub token as insecure environment variable
This commit is contained in:
+10
-8
@@ -1,12 +1,14 @@
|
||||
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:
|
||||
directories:
|
||||
- $HOME/.dotnet
|
||||
|
||||
+27
-5
@@ -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 /
|
||||
|
||||
Reference in New Issue
Block a user