From 3a2c7fb5221e3715b2ce90297e72a1e1fd7b57fe Mon Sep 17 00:00:00 2001 From: Maarten Date: Mon, 5 Oct 2020 22:00:01 +0200 Subject: [PATCH] Allow Github version tags to match when using a "vX.Y.Z" tag instead of "X.Y.Z" --- PSDepend/PSDependScripts/GitHub.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PSDepend/PSDependScripts/GitHub.ps1 b/PSDepend/PSDependScripts/GitHub.ps1 index 014cf32..0d16724 100644 --- a/PSDepend/PSDependScripts/GitHub.ps1 +++ b/PSDepend/PSDependScripts/GitHub.ps1 @@ -351,9 +351,9 @@ if($ShouldInstall) { foreach($GitHubTag in $GitHubTags) { - if($GitHubTag.name -match "^\d+(?:\.\d+)+$" -and ($DependencyVersion -match "^\d+(?:\.\d+)+$" -or $DependencyVersion -eq "latest")) + if($GitHubTag.name -match "^v?\d+(?:\.\d+)+$" -and ($DependencyVersion -match "^\d+(?:\.\d+)+$" -or $DependencyVersion -eq "latest")) { - $GitHubVersion = New-Object "System.Version" $GitHubTag.name + $GitHubVersion = New-Object "System.Version" ($GitHubTag.name -replace '^v','') if($DependencyVersion -Eq "latest") {