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
|
# & git -C "$RepoDir" fetch --tags
|
||||||
# if ($lastExitCode -ne "0") { throw "'git fetch --tags' failed" }
|
# if ($lastExitCode -ne "0") { throw "'git fetch --tags' failed" }
|
||||||
|
|
||||||
$LatestTag = (git -C "$RepoDir" describe --tags --abbrev=0 --always)
|
$LatestTagCommitID = (git -C "$RepoDir" rev-list --tags --max-count=1)
|
||||||
"🔖$LatestTag"
|
$LatestTag = (git -C "$RepoDir" describe --tags $LatestTagCommitID)
|
||||||
|
"🔖$LatestTag ($LatestTagCommitID)"
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
} catch {
|
} catch {
|
||||||
|
@ -31,8 +31,9 @@ try {
|
|||||||
# & git -C "$Folder" fetch --tags
|
# & git -C "$Folder" fetch --tags
|
||||||
# if ($lastExitCode -ne "0") { throw "'git fetch --tags' failed" }
|
# if ($lastExitCode -ne "0") { throw "'git fetch --tags' failed" }
|
||||||
|
|
||||||
$LatestTag = (git -C "$Folder" describe --tags --abbrev=0 --always)
|
$LatestTagCommitID = (git -C "$Folder" rev-list --tags --max-count=1)
|
||||||
"* $FolderName $LatestTag"
|
$LatestTag = (git -C "$Folder" describe --tags $LatestTagCommitID)
|
||||||
|
"* $FolderName $LatestTag ($LatestTagCommitID)"
|
||||||
}
|
}
|
||||||
exit 0
|
exit 0
|
||||||
} catch {
|
} catch {
|
||||||
|
Loading…
Reference in New Issue
Block a user