Merge pull request #688 from PowerShell/travis-module

Use Start-PSBuild on Travis
This commit is contained in:
Andy Schwartzmeyer 2016-03-17 13:09:29 -07:00
commit 9f868965af
2 changed files with 18 additions and 3 deletions

View file

@ -13,10 +13,11 @@ before_install:
- sudo sh -c 'echo "deb [arch=amd64] http://apt-mo.trafficmanager.net/repos/dotnet/ trusty main" > /etc/apt/sources.list.d/dotnetdev.list'
- sudo apt-key adv --keyserver apt-mo.trafficmanager.net --recv-keys 417A0893
- sudo apt-get -qq update
- sudo apt-get install -y dotnet=1.0.0.001425-1
- sudo apt-get install -y dotnet=1.0.0.001675-1
- ./download.sh
- sudo dpkg -i powershell.deb
script:
- dotnet restore
- ./build.sh
- powershell -c "Import-Module ./PowerShellGitHubDev.psm1; Start-PSBuild"
- ./pester.sh
notifications:
slack:

14
download.sh Executable file
View file

@ -0,0 +1,14 @@
#!/usr/bin/env bash
[[ -n $GITHUB_TOKEN ]] || { echo >&2 "GITHUB_TOKEN variable is undefined, please provide token"; exit 1; }
# Authorizes with read-only access to GitHub API
# Retrieves URL of v0.2.0 release asset
# Downloads asset to powershell.deb
curl -s -i \
-H "Authorization: token $GITHUB_TOKEN " \
-H 'Accept: application/octet-stream' \
'https://api.github.com/repos/PowerShell/PowerShell/releases/assets/1398546' |
grep location |
sed 's/location: //g' |
wget -i - -O powershell.deb