diff --git a/Scripts/list-latest-tag.ps1 b/Scripts/list-latest-tag.ps1 index 62e897fb..f5e8cee8 100755 --- a/Scripts/list-latest-tag.ps1 +++ b/Scripts/list-latest-tag.ps1 @@ -1,4 +1,4 @@ -<# +<# .SYNTAX list-latest-tag.ps1 [] .DESCRIPTION lists the latest tag on the current branch in a Git repository .LINK https://github.com/fleschutz/PowerShell @@ -17,10 +17,11 @@ try { $Null = (git --version) if ($lastExitCode -ne "0") { throw "Can't execute 'git' - make sure Git is installed and available" } - & git fetch --all --recurse-submodules --jobs=4 + & git fetch if ($lastExitCode -ne "0") { throw "'git fetch' failed" } - & git describe --tags --abbrev=0 + $Tag = (git describe --tags --abbrev=0) + "🔖$Tag" exit 0 } catch { write-error "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"