Ver código fonte

UpdateRepos.ps1 get latest of branch

Ryan Brandenburg 8 anos atrás
pai
commit
a686b8ed36
1 arquivos alterados com 2 adições e 1 exclusões
  1. 2 1
      scripts/UpdateRepos.ps1

+ 2 - 1
scripts/UpdateRepos.ps1

@@ -56,11 +56,12 @@ Push-Location $ModuleDirectory
 try {
 try {
 
 
     $build_errors = @()
     $build_errors = @()
-    # Get-Submodules also update --init's them
     $submodules = Get-Submodules $RepoRoot
     $submodules = Get-Submodules $RepoRoot
     foreach ($submodule in $submodules) {
     foreach ($submodule in $submodules) {
         Push-Location $submodule.path
         Push-Location $submodule.path
         try {
         try {
+            Invoke-Block { & git fetch }
+            Invoke-Block { & git checkout origin/$($submodule.branch) }
             $depsFile = Join-Path (Join-Path $($submodule.path) "build") "dependencies.props"
             $depsFile = Join-Path (Join-Path $($submodule.path) "build") "dependencies.props"
 
 
             if (!(Test-Path $depsFile)) {
             if (!(Test-Path $depsFile)) {