mirror of
https://github.com/netchx/netch.git
synced 2026-03-18 18:13:21 +08:00
Update build script: exit when curl failed
This commit is contained in:
@@ -24,6 +24,10 @@ param (
|
||||
|
||||
.\download.ps1 $OutputPath
|
||||
|
||||
if ( -Not $? ) {
|
||||
Exit 1
|
||||
}
|
||||
|
||||
Write-Host "Building $Configuration to $OutputPath"
|
||||
dotnet publish `
|
||||
-c $Configuration `
|
||||
|
||||
@@ -46,6 +46,11 @@ function DownloadAndExtract {
|
||||
$TargetPath
|
||||
)
|
||||
$json = Invoke-RestMethod "https://api.github.com/repos/$Owner/$Repo/git/refs/$ref"
|
||||
|
||||
if ( -Not $? ) {
|
||||
Exit 1;
|
||||
}
|
||||
|
||||
$sha = $json.object.sha
|
||||
$archiveUrl = "https://github.com/$Owner/$Repo/archive/$sha.zip"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user