mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-11-23 08:23:14 +01:00
Improve list-lastest-tag.ps1 and list-latest-tags.ps1
This commit is contained in:
parent
16c1026a4c
commit
5b586a8511
@ -20,14 +20,14 @@ try {
|
||||
$Null = (git --version)
|
||||
if ($lastExitCode -ne "0") { throw "Can't execute 'git' - make sure Git is installed and available" }
|
||||
|
||||
$RepoDirName = (get-item "$RepoDir").Name
|
||||
"🢃 Fetching updates for 📂$RepoDirName ..."
|
||||
# $RepoDirName = (get-item "$RepoDir").Name
|
||||
# "🢃 Fetching updates for 📂$RepoDirName ..."
|
||||
# & git -C "$RepoDir" fetch --tags
|
||||
# if ($lastExitCode -ne "0") { throw "'git fetch --tags' failed" }
|
||||
|
||||
& git -C "$RepoDir" fetch --tags
|
||||
if ($lastExitCode -ne "0") { throw "'git fetch --tags' failed" }
|
||||
$LatestTag = (git -C "$RepoDir" describe --tags --abbrev=0 --always)
|
||||
"🔖$LatestTag"
|
||||
|
||||
$Tag = (git -C "$RepoDir" describe --tags --abbrev=0)
|
||||
"🔖$Tag"
|
||||
exit 0
|
||||
} catch {
|
||||
write-error "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
|
@ -28,10 +28,10 @@ try {
|
||||
foreach ($Folder in $Folders) {
|
||||
$FolderName = (get-item "$Folder").Name
|
||||
|
||||
& git -C "$Folder" fetch --tags
|
||||
if ($lastExitCode -ne "0") { throw "'git fetch --tags' failed" }
|
||||
# & git -C "$Folder" fetch --tags
|
||||
# if ($lastExitCode -ne "0") { throw "'git fetch --tags' failed" }
|
||||
|
||||
$LatestTag = (git -C "$Folder" describe --tags --abbrev=0)
|
||||
$LatestTag = (git -C "$Folder" describe --tags --abbrev=0 --always)
|
||||
"* $FolderName $LatestTag"
|
||||
}
|
||||
exit 0
|
||||
|
Loading…
Reference in New Issue
Block a user