Use fork of universe

This commit is contained in:
Ryan Brandenburg 2018-04-24 10:20:55 -07:00
parent 43b52b6933
commit 76ff1dc5cd
3 changed files with 15 additions and 7 deletions

View File

@ -68,7 +68,7 @@ try {
$body = CommitUpdatedVersions $updatedVars $dependencies $depsPath
if ($body) {
CreatePR $GithubUpstreamBranch $destinationBranch $body $GithubToken
CreatePR "aspnet" $GithubUsername $GithubUpstreamBranch $destinationBranch $body $GithubToken
}
}
}

View File

@ -22,6 +22,9 @@ $coreFxRepo = "dotnet/corefx"
$coreSetupVersions = "$githubRaw/$versionsRepo/$versionsBranch/build-info/$coreSetupRepo/master/Latest_Packages.txt"
$tempDir = "$PSScriptRoot/../obj"
mkdir -Path $tempDir -ErrorAction Ignore
$localCoreSetupVersions = "$tempDir/coresetup.packages"
Write-Host "Downloading $coreSetupVersions to $localCoreSetupVersions"
Invoke-WebRequest -OutFile $localCoreSetupVersions -Uri $coreSetupVersions
@ -103,19 +106,18 @@ $depsPath = Resolve-Path "$PSScriptRoot/../build/dependencies.props"
Write-Host "Loading deps from $depsPath"
[xml] $dependencies = LoadXml $depsPath
$remote = "origin"
$baseBranch = "dev"
$currentBranch = Invoke-Block { & git rev-parse --abbrev-ref HEAD }
$destinationBranch = "rybrande/UpgradeDepsTest"
Invoke-Block { & git checkout -tb $destinationBranch "$remote/$baseBranch" }
Invoke-Block { & git checkout -tb $destinationBranch "origin/$baseBranch" }
try {
$updatedVars = UpdateVersions $variables $dependencies $depsPath
$body = CommitUpdatedVersions $updatedVars $dependencies $depsPath
if ($body) {
CreatePR $baseBranch $destinationBranch $body $GithubToken
CreatePR "aspnet" $GithubUsername $baseBranch $destinationBranch $body $GithubToken
}
}
finally {

View File

@ -136,11 +136,17 @@ function Ensure-Hub() {
return $hubLocation
}
function CreatePR([string]$baseBranch, [string]$destinationBranch, [string]$body, [string]$gitHubToken) {
function CreatePR(
[string]$baseFork,
[string]$headFork,
[string]$baseBranch,
[string]$destinationBranch,
[string]$body,
[string]$gitHubToken) {
$hubLocation = Ensure-Hub
Invoke-Block { git push -f https://$gitHubToken@github.com/aspnet/Universe.git $destinationBranch }
& $hubLocation pull-request -f -b $baseBranch -h $destinationBranch -m $body
Invoke-Block { git push -f https://$gitHubToken@github.com/$headFork/Universe.git $destinationBranch }
& $hubLocation pull-request -f -b "${baseFork}:$baseBranch" -h "${headFork}:$destinationBranch" -m $body
}
function Set-GithubInfo(