mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-12-29 10:09:37 +01:00
Update new-branch.ps1
This commit is contained in:
parent
4de252f33f
commit
8a1935170f
@ -8,7 +8,7 @@
|
|||||||
.PARAMETER repoPath
|
.PARAMETER repoPath
|
||||||
Specifies the path to the Git repository (current working directory per default)
|
Specifies the path to the Git repository (current working directory per default)
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./new-branch.ps1 test123
|
PS> ./new-branch.ps1 test123 C:\MyRepo
|
||||||
.LINK
|
.LINK
|
||||||
https://github.com/fleschutz/PowerShell
|
https://github.com/fleschutz/PowerShell
|
||||||
.NOTES
|
.NOTES
|
||||||
@ -50,7 +50,7 @@ try {
|
|||||||
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
|
[int]$elapsed = $stopWatch.Elapsed.TotalSeconds
|
||||||
"✔️ created branch '$newBranch' based on '$currentBranch' in repo 📂$repoPathName in $elapsed sec"
|
"✔️ Creating branch '$newBranch' in repo 📂$repoPathName (based on '$currentBranch') took $elapsed sec"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
|
Loading…
Reference in New Issue
Block a user