diff --git a/Scripts/pull-repo.ps1 b/Scripts/pull-repo.ps1 index 9425f75a..f95ead78 100755 --- a/Scripts/pull-repo.ps1 +++ b/Scripts/pull-repo.ps1 @@ -8,6 +8,7 @@ param($RepoDir = "$PWD") try { + "🢃 Pulling updates..." $StopWatch = [system.diagnostics.stopwatch]::startNew() if (-not(test-path "$RepoDir" -pathType container)) { throw "Can't access directory: $RepoDir" } @@ -20,10 +21,12 @@ try { exit 0 } - "🢃 Pulling updates..." & git pull --recurse-submodules --jobs=4 if ($lastExitCode -ne "0") { throw "'git pull' failed" } + & git submodule update --init --recursive + if ($lastExitCode -ne "0") { throw "'git submodule update' failed" } + $RepoDirName = (get-item "$RepoDir").Name [int]$Elapsed = $StopWatch.Elapsed.TotalSeconds "✔️ pulled updates for Git repository 📂$RepoDirName in $Elapsed sec" diff --git a/Scripts/pull-repos.ps1 b/Scripts/pull-repos.ps1 index 8d7142ae..6d447c10 100755 --- a/Scripts/pull-repos.ps1 +++ b/Scripts/pull-repos.ps1 @@ -25,9 +25,10 @@ try { "🢃 Pulling 📂$FolderName..." & git -C "$Folder" pull --recurse-submodules --jobs=4 - if ($lastExitCode -ne "0") { - write-warning "'git pull' on 📂$FolderName failed" - } + if ($lastExitCode -ne "0") { write-warning "'git pull' on 📂$FolderName failed" } + + & git -C "$Folder" submodule update --init --recursive + if ($lastExitCode -ne "0") { throw "'git submodule update' failed" } } [int]$Elapsed = $StopWatch.Elapsed.TotalSeconds