Fix Hub location
This commit is contained in:
parent
43cd223f2f
commit
66d3de5142
|
|
@ -109,6 +109,7 @@ Write-Host "Loading deps from $depsPath"
|
||||||
|
|
||||||
if (-not $NoCommit) {
|
if (-not $NoCommit) {
|
||||||
$baseBranch = "dev"
|
$baseBranch = "dev"
|
||||||
|
Invoke-Block { & git fetch origin }
|
||||||
|
|
||||||
$currentBranch = Invoke-Block { & git rev-parse --abbrev-ref HEAD }
|
$currentBranch = Invoke-Block { & git rev-parse --abbrev-ref HEAD }
|
||||||
$destinationBranch = "rybrande/UpgradeDepsTest"
|
$destinationBranch = "rybrande/UpgradeDepsTest"
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,10 @@ function Invoke-Block([scriptblock]$cmd) {
|
||||||
# - $?: did the powershell script block throw an error
|
# - $?: did the powershell script block throw an error
|
||||||
# - $lastexitcode: did a windows command executed by the script block end in error
|
# - $lastexitcode: did a windows command executed by the script block end in error
|
||||||
if ((-not $?) -or ($lastexitcode -ne 0)) {
|
if ((-not $?) -or ($lastexitcode -ne 0)) {
|
||||||
Write-Warning $error[0]
|
if(($error -ne $null))
|
||||||
|
{
|
||||||
|
Write-Warning $error[0]
|
||||||
|
}
|
||||||
throw "Command failed to execute: $cmd"
|
throw "Command failed to execute: $cmd"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -121,9 +124,8 @@ function Ensure-Hub() {
|
||||||
if (-Not (Test-Path $hubLocation) ) {
|
if (-Not (Test-Path $hubLocation) ) {
|
||||||
$source = "https://github.com/github/hub/releases/download/v2.3.0-pre9/hub-windows-amd64-2.3.0-pre9.zip"
|
$source = "https://github.com/github/hub/releases/download/v2.3.0-pre9/hub-windows-amd64-2.3.0-pre9.zip"
|
||||||
$zipLocation = "$tmpDir\hub.zip"
|
$zipLocation = "$tmpDir\hub.zip"
|
||||||
if(-not (Test-Path $zipLocation)) {
|
|
||||||
New-Item -ItemType directory -Path $tmpDir
|
mkdir -Path $tmpDir -ErrorAction Ignore | Out-Null
|
||||||
}
|
|
||||||
|
|
||||||
Invoke-WebRequest -OutFile $zipLocation -Uri $source
|
Invoke-WebRequest -OutFile $zipLocation -Uri $source
|
||||||
|
|
||||||
|
|
@ -169,8 +171,7 @@ function CommitUpdatedVersions(
|
||||||
|
|
||||||
$subject = "Updating external dependencies"
|
$subject = "Updating external dependencies"
|
||||||
|
|
||||||
# Have to pipe null so that the output from this doesn't end up as part of the return value
|
Invoke-Block { & git commit -m $subject } | Out-Null
|
||||||
$null = Invoke-Block { & git commit -m $subject }
|
|
||||||
|
|
||||||
$body = "$subject`n`n"
|
$body = "$subject`n`n"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue