From 76ff1dc5cd5bb338f95c511dddf0b787a085f7a1 Mon Sep 17 00:00:00 2001 From: Ryan Brandenburg Date: Tue, 24 Apr 2018 10:20:55 -0700 Subject: [PATCH] Use fork of universe --- scripts/UpdateDependencies.ps1 | 2 +- scripts/UpdateDependenciesCoreFx.ps1 | 8 +++++--- scripts/common.psm1 | 12 +++++++++--- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/scripts/UpdateDependencies.ps1 b/scripts/UpdateDependencies.ps1 index 7146693e5b..5b0765f5dc 100755 --- a/scripts/UpdateDependencies.ps1 +++ b/scripts/UpdateDependencies.ps1 @@ -68,7 +68,7 @@ try { $body = CommitUpdatedVersions $updatedVars $dependencies $depsPath if ($body) { - CreatePR $GithubUpstreamBranch $destinationBranch $body $GithubToken + CreatePR "aspnet" $GithubUsername $GithubUpstreamBranch $destinationBranch $body $GithubToken } } } diff --git a/scripts/UpdateDependenciesCoreFx.ps1 b/scripts/UpdateDependenciesCoreFx.ps1 index 764aecfa5d..23fc82a88f 100644 --- a/scripts/UpdateDependenciesCoreFx.ps1 +++ b/scripts/UpdateDependenciesCoreFx.ps1 @@ -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 { diff --git a/scripts/common.psm1 b/scripts/common.psm1 index c2d2e2a8ca..2911495571 100644 --- a/scripts/common.psm1 +++ b/scripts/common.psm1 @@ -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(