mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-01-11 16:39:10 +01:00
Improved output of sync-repo.ps1
This commit is contained in:
parent
c58b33b7d8
commit
c46fed2d97
@ -1,6 +1,6 @@
|
||||
<#
|
||||
.SYNTAX sync-repo.ps1 [<repo-dir>]
|
||||
.DESCRIPTION synchronizes a Git repository (pull&push, including submodules)
|
||||
.DESCRIPTION synchronizes a Git repository by pull & push (including submodules)
|
||||
.LINK https://github.com/fleschutz/PowerShell
|
||||
.NOTES Author: Markus Fleschutz / License: CC0
|
||||
#>
|
||||
@ -8,7 +8,7 @@
|
||||
param($RepoDir = "$PWD")
|
||||
|
||||
try {
|
||||
"⏳ Synchronizing Git repository $($RepoDir)..."
|
||||
"⏳ Synchronizing Git repository 📂$RepoDir ..."
|
||||
|
||||
if (-not(test-path "$RepoDir" -pathType container)) { throw "Can't access directory: $RepoDir" }
|
||||
set-location "$RepoDir"
|
||||
@ -22,7 +22,7 @@ try {
|
||||
& git push
|
||||
if ($lastExitCode -ne "0") { throw "'git push' failed" }
|
||||
|
||||
"✔️ Git repository $RepoDir synchronized"
|
||||
"✔️ synchronized Git repository 📂$RepoDir"
|
||||
exit 0
|
||||
} catch {
|
||||
write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
|
Loading…
Reference in New Issue
Block a user