mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Add download script to obtain PowerShell release
This requires that $GITHUB_TOKEN be set. Travis sets this as a secure environment variable; a user can provider their own.
This commit is contained in:
Executable
+14
@@ -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
|
||||
Reference in New Issue
Block a user