Skip to content

Commit

Permalink
Refactor: Simplify getting of new versions in Update-Versions.ps1
Browse files Browse the repository at this point in the history
  • Loading branch information
leojonathanoh committed Sep 13, 2023
1 parent c68c71e commit 3c1b8bb
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 3c1b8bb

Please sign in to comment.