@@ -130,33 +130,33 @@ function Fetch-DownloadUrl {
130
130
continue
131
131
}
132
132
133
- # Skip some download links as we're not interested in them
133
+ # Skip some download links as we're not interested in them
134
134
if ( $a.browser_download_url -ilike " *_symbols*" ) {
135
135
continue
136
136
}
137
137
138
138
$score = Match- Filenames $url $a.browser_download_url
139
139
140
- # Skip links that don't match or are less similar
140
+ # Skip links that don't match or are less similar
141
141
if ( ($score -eq 0 ) -or ($score -lt $charCount ) ) {
142
142
continue
143
143
}
144
144
145
- # If we reach the same download link as we have
145
+ # If we reach the same download link as we have
146
146
if ( $score -eq [System.IO.Path ]::GetFileName($url ).Length ) {
147
147
}
148
148
149
149
$charCount = $score
150
150
$downloadLinks.Add ($a.browser_download_url )
151
151
}
152
152
153
- # If at least one download link was found, don't continue with older releases
153
+ # If at least one download link was found, don't continue with older releases
154
154
if ( $downloadLinks.Length -gt 0 ) {
155
155
break :loop
156
156
}
157
157
}
158
158
159
- # Special case for archive downloads of repository
159
+ # Special case for archive downloads of repository
160
160
if (($null -eq $downloadLinks ) -Or (-Not $downloadLinks )) {
161
161
if ((($p | % {$_.Trim (' /' )}) -Contains " archive" ) -And $info [0 ].tag_name) {
162
162
for ($i = 0 ; $i -lt $p.Length ; $i ++ ) {
@@ -207,7 +207,7 @@ $sources = Get-Content $sourcesPath | Out-String | ConvertFrom-Json
207
207
foreach ($s in $sources ) {
208
208
Write-Verbose " Updating sources link for $ ( $s.name ) ..."
209
209
210
- Write-Verbose " Old Link: $ ( $s.url ) "
210
+ Write-Verbose " Old Link: $ ( $s.url ) "
211
211
212
212
$downloadUrl = Fetch- DownloadUrl $s.url
213
213
@@ -236,13 +236,13 @@ foreach ($s in $sources) {
236
236
237
237
Write-Verbose " Version: $version "
238
238
239
- if ( $s.version -ne $version ) {
240
- # if ( ([System.Version] $s.version) -gt ([System.Version] $version) ) {
241
- # throw "The current version $($s.version) is already newer than the found version $version!"
242
- # }
239
+ if ( $s.version -ne $version ) {
240
+ # if ( ([System.Version] $s.version) -gt ([System.Version] $version) ) {
241
+ # throw "The current version $($s.version) is already newer than the found version $version!"
242
+ # }
243
243
244
- $count ++
245
- }
244
+ $count ++
245
+ }
246
246
247
247
$s.url = $downloadUrl
248
248
$s.version = $version
@@ -251,8 +251,8 @@ foreach ($s in $sources) {
251
251
$sources | ConvertTo-Json | Set-Content $sourcesPath
252
252
253
253
if ($count -eq 0 ) {
254
- Write-Host - ForegroundColor yellow " No new releases were found."
255
- return
254
+ Write-Host - ForegroundColor yellow " No new releases were found."
255
+ return
256
256
}
257
257
258
258
if ( $Env: APPVEYOR -eq ' True' ) {
0 commit comments