Skip to content

Commit

Permalink
Merge pull request #31 from theohbrothers/refactor/simplify-getting-o…
Browse files Browse the repository at this point in the history
…f-new-versions-in-update-versions.ps1

Refactor: Simplify getting of new versions in `Update-Versions.ps1`
  • Loading branch information
leojonathanoh authored Sep 13, 2023
2 parents c68c71e + 3c1b8bb commit f284988
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Update-Versions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ try {
# Get new versions
$versionsNew = & {
$content = (Invoke-WebRequest https://sourceforge.net/p/isync/isync/ref/master/tags/).Content
$matches = [regex]::Matches($content, '/p/isync/isync/ci/v[^/]+/tree/')
$matches -replace '/p/isync/isync/ci/v([^/]+)/tree/', '$1' | Sort-Object { [version]$_ } -Descending
[regex]::Matches($content, '/p/isync/isync/ci/v([^/]+)/tree/') | % { $_.Groups[1].Value } | Sort-Object { [version]$_ } -Descending
}
# Get changed versions
$versionsChanged = Get-VersionsChanged -Versions $versions -VersionsNew $versionsNew -AsObject -Descending
Expand Down

0 comments on commit f284988

Please sign in to comment.