Updated the manuals

This commit is contained in:
Markus Fleschutz
2025-05-12 22:04:02 +02:00
parent b3cdf19f4a
commit 09eb3d1808
651 changed files with 8362 additions and 1405 deletions

View File

@@ -15,6 +15,7 @@ Parameters
Position? 1
Default value
Accept pipeline input? false
Aliases
Accept wildcard characters? false
-pathToRepo <String>
@@ -24,6 +25,7 @@ Parameters
Position? 2
Default value "$PWD"
Accept pipeline input? false
Aliases
Accept wildcard characters? false
[<CommonParameters>]
@@ -89,35 +91,35 @@ try {
Write-Host "⏳ (1/6) Searching for Git executable... " -noNewline
& git --version
if ($lastExitCode -ne "0") { throw "Can't execute 'git' - make sure Git is installed and available" }
if ($lastExitCode -ne 0) { throw "Can't execute 'git' - make sure Git is installed and available" }
Write-Host "⏳ (2/6) Checking local repository... $pathToRepo"
if (-not(Test-Path "$pathToRepo" -pathType container)) { throw "Can't access repo folder: $pathToRepo" }
$result = (git -C "$pathToRepo" status)
if ($lastExitCode -ne "0") { throw "'git status' in $pathToRepo failed with exit code $lastExitCode" }
if ($lastExitCode -ne 0) { throw "'git status' in $pathToRepo failed with exit code $lastExitCode" }
$repoName = (Get-Item "$pathToRepo").Name
Write-Host "⏳ (3/6) Fetching remote updates... " -noNewline
& git -C "$pathToRepo" remote get-url origin
if ($lastExitCode -ne "0") { throw "'git remote get-url origin' failed with exit code $lastExitCode" }
if ($lastExitCode -ne 0) { throw "'git remote get-url origin' failed with exit code $lastExitCode" }
& git -C "$pathToRepo" fetch --all --recurse-submodules --prune --prune-tags --force
if ($lastExitCode -ne "0") { throw "'git fetch' failed with exit code $lastExitCode" }
if ($lastExitCode -ne 0) { throw "'git fetch' failed with exit code $lastExitCode" }
$currentBranch = (git -C "$pathToRepo" rev-parse --abbrev-ref HEAD)
if ($lastExitCode -ne "0") { throw "'git rev-parse' failed with exit code $lastExitCode" }
if ($lastExitCode -ne 0) { throw "'git rev-parse' failed with exit code $lastExitCode" }
"⏳ (4/6) Creating new branch..."
& git -C "$pathToRepo" checkout -b "$newBranch"
if ($lastExitCode -ne "0") { throw "'git checkout -b $newBranch' failed with exit code $lastExitCode" }
if ($lastExitCode -ne 0) { throw "'git checkout -b $newBranch' failed with exit code $lastExitCode" }
"⏳ (5/6) Pushing updates..."
& git -C "$pathToRepo" push origin "$newBranch"
if ($lastExitCode -ne "0") { throw "'git push origin $newBranch' failed with exit code $lastExitCode" }
if ($lastExitCode -ne 0) { throw "'git push origin $newBranch' failed with exit code $lastExitCode" }
"⏳ (6/6) Updating submodules..."
& git -C "$pathToRepo" submodule update --init --recursive
if ($lastExitCode -ne "0") { throw "'git submodule update' failed with exit code $lastExitCode" }
if ($lastExitCode -ne 0) { throw "'git submodule update' failed with exit code $lastExitCode" }
[int]$elapsed = $stopWatch.Elapsed.TotalSeconds
"✅ Created branch '$newBranch' based on '$currentBranch' in 📂$repoName repo in $($elapsed)s."
@@ -128,4 +130,4 @@ try {
}
```
*(page generated by convert-ps2md.ps1 as of 01/23/2025 12:15:23)*
*(page generated by convert-ps2md.ps1 as of 05/12/2025 22:02:56)*