Merge pull request #1864 from andschwa/public-repo
Fix scripts for public repo
This commit is contained in:
commit
c1faf1e6e1
|
@ -17,12 +17,7 @@ addons:
|
||||||
s3_region: "us-west-2"
|
s3_region: "us-west-2"
|
||||||
paths: $(ls powershell*{deb,pkg} | tr "\n" ":")
|
paths: $(ls powershell*{deb,pkg} | tr "\n" ":")
|
||||||
|
|
||||||
git:
|
|
||||||
submodules: false
|
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- git config --global url.git@github.com:.insteadOf https://github.com/
|
|
||||||
- git submodule update --init
|
|
||||||
- (cd tools && ./download.sh)
|
- (cd tools && ./download.sh)
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then rvm use 2.2.1; fi # Default 2.0.0 Ruby is buggy
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then rvm use 2.2.1; fi # Default 2.0.0 Ruby is buggy
|
||||||
|
|
||||||
|
|
|
@ -66,10 +66,10 @@ If you have any problems building, please consult the developer [FAQ][].
|
||||||
|
|
||||||
[FAQ]: docs/FAQ.md
|
[FAQ]: docs/FAQ.md
|
||||||
|
|
||||||
[tv-image]: https://travis-ci.com/PowerShell/PowerShell.svg?token=31YifM4jfyVpBmEGitCm&branch=master
|
[tv-image]:
|
||||||
[tv-site]: https://travis-ci.com/PowerShell/PowerShell/branches
|
[tv-site]:
|
||||||
[av-image]: https://ci.appveyor.com/api/projects/status/jtefab3hpngtyesp/branch/master?svg=true
|
[av-image]:
|
||||||
[av-site]: https://ci.appveyor.com/project/PowerShell/powershell/branch/master
|
[av-site]:
|
||||||
|
|
||||||
Downloading the Source Code
|
Downloading the Source Code
|
||||||
---------------------------
|
---------------------------
|
||||||
|
|
|
@ -6,16 +6,7 @@ cache:
|
||||||
nuget:
|
nuget:
|
||||||
project_feed: true
|
project_feed: true
|
||||||
|
|
||||||
environment:
|
|
||||||
priv_key:
|
|
||||||
secure: <encryped-value>
|
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- ps: $fileContent = "-----BEGIN RSA PRIVATE KEY-----`n"
|
|
||||||
- ps: $fileContent += $env:priv_key.Replace(' ', "`n")
|
|
||||||
- ps: $fileContent += "`n-----END RSA PRIVATE KEY-----`n"
|
|
||||||
- ps: Set-Content c:\users\appveyor\.ssh\id_rsa $fileContent
|
|
||||||
- git config --global url.git@github.com:.insteadOf https://github.com/
|
|
||||||
- git submodule update --init
|
- git submodule update --init
|
||||||
- ps: $buildConfiguration = 'Release'
|
- ps: $buildConfiguration = 'Release'
|
||||||
- ps: Import-Module .\build.psm1; Start-PSBootstrap -Force
|
- ps: Import-Module .\build.psm1; Start-PSBootstrap -Force
|
||||||
|
|
|
@ -1,16 +1,9 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
GITHUB_TOKEN=a27573e27bea23fb05393ead69511b09e3b224be
|
|
||||||
|
|
||||||
# Authorizes with read-only access to GitHub API
|
|
||||||
curl_() {
|
|
||||||
curl -s -i -H "Authorization: token $GITHUB_TOKEN" "$@"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Retrieves asset ID and package name of asset ending in argument
|
# Retrieves asset ID and package name of asset ending in argument
|
||||||
# $info looks like: "id": 1698239, "name": "powershell_0.4.0-1_amd64.deb",
|
# $info looks like: "id": 1698239, "name": "powershell_0.4.0-1_amd64.deb",
|
||||||
get_info() {
|
get_info() {
|
||||||
curl_ https://api.github.com/repos/PowerShell/PowerShell/releases/latest | grep -B 1 "name.*$1"
|
curl -s https://api.github.com/repos/PowerShell/PowerShell/releases/latest | grep -B 1 "name.*$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Get OS specific asset ID and package name
|
# Get OS specific asset ID and package name
|
||||||
|
@ -55,7 +48,7 @@ info=$(get_info $version)
|
||||||
read asset package <<< $(echo $info | sed 's/[,"]//g' | awk '{ print $2; print $4 }')
|
read asset package <<< $(echo $info | sed 's/[,"]//g' | awk '{ print $2; print $4 }')
|
||||||
|
|
||||||
# Downloads asset to file
|
# Downloads asset to file
|
||||||
curl_ -H 'Accept: application/octet-stream' https://api.github.com/repos/PowerShell/PowerShell/releases/assets/$asset |
|
curl -s -H 'Accept: application/octet-stream' https://api.github.com/repos/PowerShell/PowerShell/releases/assets/$asset |
|
||||||
grep location | sed 's/location: //g' | wget -i - -O $package
|
grep location | sed 's/location: //g' | wget -i - -O $package
|
||||||
|
|
||||||
# Installs PowerShell package
|
# Installs PowerShell package
|
||||||
|
|
Loading…
Reference in a new issue