Skip to content

Allow Github version tags to match when using a "vX.Y.Z" tag instead of "X.Y.Z" #114

@mpiederiet

Description

@mpiederiet

Some Github module repos use "vX.Y.Z" tag numbering instead of "X.Y.Z". The following lines in PSDependScripts\Github.ps1 will ensure that the dependency will install (Install-Dependency) and test (Test-Dependency) correctly:
(changes in bold, line 354-356)
if($GitHubTag.name -match "^v{0,1}\d+(?:.\d+)+$" -and ($DependencyVersion -match "^\d+(?:.\d+)+$" -or $DependencyVersion -eq "latest"))
{
$GitHubVersion = New-Object "System.Version" ($GitHubTag.name -replace '^v','')

This allows the dependency Version = 'latest' as well as Version = 'x.y.z' to match the mentioned Github tag numbering format.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions