Skip to content

Commit

Permalink
Merge pull request #102 from theohbrothers/chore/cleanup-unneeded-cod…
Browse files Browse the repository at this point in the history
…e-in-get-versionschanged

Chore: Cleanup unneeded code in `Get-VersionsChanged`
  • Loading branch information
leojonathanoh authored Oct 15, 2023
2 parents fe59174 + 61af654 commit 1b35ea0
Showing 1 changed file with 0 additions and 44 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,48 +164,4 @@ function Get-VersionsChanged {
,@( $versionsChanged.Keys | Sort-Object )
}
}

# $vMajMatch = $VersionsNew | ? { $vn = [version]$_; $vn.Major -eq $v.Major }
# if ($vMajMatch) {
# "Found new major version: $vMajMatch" | Write-Verbose
# [pscustomobject]@{
# from = ''
# to = $vMajMatch.ToString()
# }
# }
# $vMinMatch = $VersionsNew | ? { $vn = [version]$_; $vn.Major -eq $v.Major -and $vn.Minor -eq $v.Major }
# if ($vMajMatch) {
# "Found new major version: $vMajMatch" | Write-Verbose
# [pscustomobject]@{
# from = ''
# to = $vMajMatch.ToString()
# }
# }



# foreach ($vn in $VersionsNew) {
# $vn = [version]$vn
# if ($v.Major -lt $vn.Major) {
# "Found new major version: $vn" | Write-Verbose
# if (!$DryRun) {
# $VERSIONS_CLONE = @( $vn.ToString() ) + $Versions.Clone()
# $VERSIONS_CLONE | Sort-Object { [version]$_ } -Descending | ConvertTo-Json -Depth 100 | Set-Content $PSScriptRoot/generate/definitions/Versions.json -Encoding utf8
# }
# }elseif ($i -eq 0 -and $v.Major -eq $vn.Major -and $v.Minor -lt $vn.Minor) {
# "Found new minor version: $vn" | Write-Verbose
# if (!$DryRun) {
# $VERSIONS_CLONE = @( $vn.ToString() ) + $Versions.Clone()
# $VERSIONS_CLONE | Sort-Object { [version]$_ } -Descending | ConvertTo-Json -Depth 100 | Set-Content $PSScriptRoot/generate/definitions/Versions.json -Encoding utf8
# }
# "Found patch version: $v to $vn" | Write-Verbose
# }elseif ($v.Major -eq $vn.Major -and $v.Minor -eq $vn.Minor -and $v.Build -lt $vn.Build) {
# if (!$DryRun) {
# $VERSIONS_CLONE = $Versions.Clone()
# $VERSIONS_CLONE[$i] = $vn.ToString()
# $VERSIONS_CLONE | Sort-Object { [version]$_ } -Descending | ConvertTo-Json -Depth 100 | Set-Content $PSScriptRoot/generate/definitions/Versions.json -Encoding utf8
# }
# }
# }
# }
}

0 comments on commit 1b35ea0

Please sign in to comment.