mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-11-23 00:13:36 +01:00
UPdate pull-repos
This commit is contained in:
parent
1b63f059be
commit
97e2691eaf
@ -2,7 +2,7 @@
|
|||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
Pulls updates for all Git repositories in a folder (including submodules)
|
Pulls updates for all Git repositories in a folder (including submodules)
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This script pulls updates for all Git repositories in a folder (including submodules).
|
This PowerShell script pulls updates for all Git repositories in a folder (including submodules).
|
||||||
.PARAMETER ParentDir
|
.PARAMETER ParentDir
|
||||||
Specifies the path to the parent folder
|
Specifies the path to the parent folder
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
@ -31,7 +31,7 @@ try {
|
|||||||
[int]$Step = 1
|
[int]$Step = 1
|
||||||
foreach ($Folder in $Folders) {
|
foreach ($Folder in $Folders) {
|
||||||
$FolderName = (get-item "$Folder").Name
|
$FolderName = (get-item "$Folder").Name
|
||||||
"⏳ Pulling 📂$FolderName [step $Step/$NumFolders]... "
|
"⏳ ($Step/$NumFolders) Pulling 📂$FolderName... "
|
||||||
|
|
||||||
& git -C "$Folder" pull --recurse-submodules --jobs=4
|
& git -C "$Folder" pull --recurse-submodules --jobs=4
|
||||||
if ($lastExitCode -ne "0") { write-warning "'git pull' in 📂$FolderName failed" }
|
if ($lastExitCode -ne "0") { write-warning "'git pull' in 📂$FolderName failed" }
|
||||||
|
Loading…
Reference in New Issue
Block a user