mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-01-23 06:08:36 +01:00
Update fetch-repos.ps1 and pull-repos.ps1
This commit is contained in:
parent
cebc8fd9e2
commit
199b0f3162
@ -1,8 +1,8 @@
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Fetches updates for Git repos
|
||||
Fetches updates into Git repos
|
||||
.DESCRIPTION
|
||||
This PowerShell script fetches updates for all Git repositories in a folder (including submodules).
|
||||
This PowerShell script fetches updates into all Git repositories in a folder (including submodules).
|
||||
.PARAMETER ParentDir
|
||||
Specifies the path to the parent folder
|
||||
.EXAMPLE
|
||||
@ -43,7 +43,7 @@ try {
|
||||
if ($lastExitCode -ne "0") { throw "'git fetch' in $Folder failed with exit code $lastExitCode" }
|
||||
}
|
||||
[int]$Elapsed = $StopWatch.Elapsed.TotalSeconds
|
||||
"✔️ Fetching updates for $NumFolders repositories in 📂$ParentDirName took $Elapsed sec"
|
||||
"✔️ Fetching updates into $NumFolders repositories under 📂$ParentDirName took $Elapsed sec"
|
||||
exit 0 # success
|
||||
} catch {
|
||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
|
@ -1,8 +1,8 @@
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Pulls updates for Git repos
|
||||
Pulls updates into Git repos
|
||||
.DESCRIPTION
|
||||
This PowerShell script pulls updates for all Git repositories in a folder (including submodules).
|
||||
This PowerShell script pulls updates into all Git repositories in a folder (including submodules).
|
||||
.PARAMETER ParentDir
|
||||
Specifies the path to the parent folder
|
||||
.EXAMPLE
|
||||
@ -47,7 +47,7 @@ try {
|
||||
$Step++
|
||||
}
|
||||
[int]$Elapsed = $StopWatch.Elapsed.TotalSeconds
|
||||
"✔️ Pulling updates for $NumFolders repositories in 📂$ParentDirName took $Elapsed sec ($Failed failed)"
|
||||
"✔️ Pulling updates into $NumFolders repositories under 📂$ParentDirName took $Elapsed sec ($Failed failed)"
|
||||
exit 0 # success
|
||||
} catch {
|
||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
|
Loading…
Reference in New Issue
Block a user