mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-03-28 15:46:35 +01:00
Improve pull-repos.ps1 and switch-branch.ps1
This commit is contained in:
parent
f1de21d8fc
commit
882eaf4b29
@ -24,7 +24,7 @@ try {
|
||||
foreach ($Folder in $Folders) {
|
||||
$FolderName = (get-item "$Folder").Name
|
||||
$Step++
|
||||
"🢃 Pulling 📂$FolderName (step $Step/$FolderCount) ..."
|
||||
"🢃 Pulling #$Step: 📂$FolderName ..."
|
||||
|
||||
& git -C "$Folder" pull --recurse-submodules --jobs=4
|
||||
if ($lastExitCode -ne "0") { write-warning "'git pull' on 📂$FolderName failed" }
|
||||
|
@ -24,10 +24,10 @@ try {
|
||||
& git fetch --all --recurse-submodules --jobs=4
|
||||
if ($lastExitCode -ne "0") { throw "'git fetch -all --recurse-submodules' failed" }
|
||||
|
||||
& git switch "$BranchName"
|
||||
& git checkout --recurse-submodules "$BranchName"
|
||||
if ($lastExitCode -ne "0") { throw "'git switch $BranchName' failed" }
|
||||
|
||||
& git pull
|
||||
& git pull --recurse-submodules
|
||||
if ($lastExitCode -ne "0") { throw "'git pull' failed" }
|
||||
|
||||
& git submodule update --init --recursive
|
||||
|
Loading…
Reference in New Issue
Block a user