Improve fetch-repos.ps1 and pull-repos.ps1

This commit is contained in:
Markus Fleschutz 2021-09-06 20:03:41 +02:00
parent 015f367003
commit 4b0aa488d4
2 changed files with 3 additions and 3 deletions

View File

@ -24,12 +24,12 @@ try {
$Folders = (get-childItem "$ParentDir" -attributes Directory)
$FolderCount = $Folders.Count
$ParentDirName = (get-item "$ParentDir").Name
"Fetching updates for $FolderCount Git repositories at 📂$ParentDirName..."
"Found $FolderCount subfolders in 📂$ParentDirName..."
[int]$Step = 1
foreach ($Folder in $Folders) {
$FolderName = (get-item "$Folder").Name
"Step $Step/$($FolderCount): 🢃 Fetching 📂$($FolderName)..."
"Step $Step/$($FolderCount): 🢃 Fetching 📂$FolderName..."
& git -C "$Folder" fetch --all --recurse-submodules --prune --prune-tags --jobs=4
if ($lastExitCode -ne "0") { throw "'git fetch' failed" }

View File

@ -29,7 +29,7 @@ try {
[int]$Step = 1
foreach ($Folder in $Folders) {
$FolderName = (get-item "$Folder").Name
"Step $Step/$($FolderCount): 🢃 Pulling 📂$($FolderName)..."
"Step $Step/$($FolderCount): 🢃 Pulling 📂$FolderName..."
& git -C "$Folder" pull --recurse-submodules --jobs=4
if ($lastExitCode -ne "0") { write-warning "'git pull' on 📂$FolderName failed" }