mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-06-18 19:07:04 +02:00
Improve list-tags.ps1
This commit is contained in:
parent
fb94c247d9
commit
6c0116adb7
@ -19,16 +19,14 @@ try {
|
|||||||
$Null = (git --version)
|
$Null = (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" }
|
||||||
|
|
||||||
"🢃 Fetching updates..."
|
"🢃 Fetching latest tags..."
|
||||||
& git -C "$RepoDir" fetch --all --quiet
|
& git -C "$RepoDir" fetch --all --tags --quiet
|
||||||
if ($lastExitCode -ne "0") { throw "'git fetch --all' failed" }
|
if ($lastExitCode -ne "0") { throw "'git fetch --all --tags' failed" }
|
||||||
|
|
||||||
$RepoDirName = (get-item "$RepoDir").Name
|
|
||||||
[system.threading.thread]::currentthread.currentculture=[system.globalization.cultureinfo]"en-US"
|
|
||||||
""
|
""
|
||||||
"🔖 Tags in Git repository 📂$RepoDirName as of $((Get-Date).ToShortDateString()):"
|
"Tag Description"
|
||||||
|
"--- -----------"
|
||||||
& git -C "$RepoDir" tag --list "$Pattern" --column
|
& git -C "$RepoDir" tag --list "$Pattern" -n
|
||||||
if ($lastExitCode -ne "0") { throw "'git tag --list' failed" }
|
if ($lastExitCode -ne "0") { throw "'git tag --list' failed" }
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user