mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-02-24 05:30:54 +01:00
Improve list-latest-tag.ps1 and list-latest-tags.ps1
This commit is contained in:
parent
5b586a8511
commit
5a434e2dc6
@ -25,8 +25,9 @@ try {
|
||||
# & git -C "$RepoDir" fetch --tags
|
||||
# if ($lastExitCode -ne "0") { throw "'git fetch --tags' failed" }
|
||||
|
||||
$LatestTag = (git -C "$RepoDir" describe --tags --abbrev=0 --always)
|
||||
"🔖$LatestTag"
|
||||
$LatestTagCommitID = (git -C "$RepoDir" rev-list --tags --max-count=1)
|
||||
$LatestTag = (git -C "$RepoDir" describe --tags $LatestTagCommitID)
|
||||
"🔖$LatestTag ($LatestTagCommitID)"
|
||||
|
||||
exit 0
|
||||
} catch {
|
||||
|
@ -31,8 +31,9 @@ try {
|
||||
# & git -C "$Folder" fetch --tags
|
||||
# if ($lastExitCode -ne "0") { throw "'git fetch --tags' failed" }
|
||||
|
||||
$LatestTag = (git -C "$Folder" describe --tags --abbrev=0 --always)
|
||||
"* $FolderName $LatestTag"
|
||||
$LatestTagCommitID = (git -C "$Folder" rev-list --tags --max-count=1)
|
||||
$LatestTag = (git -C "$Folder" describe --tags $LatestTagCommitID)
|
||||
"* $FolderName $LatestTag ($LatestTagCommitID)"
|
||||
}
|
||||
exit 0
|
||||
} catch {
|
||||
|
Loading…
Reference in New Issue
Block a user