Skip to content

Commit

Permalink
Refactor MongoDB CLI scripts to use environment variable for package …
Browse files Browse the repository at this point in the history
…name
  • Loading branch information
Utesgui authored Apr 30, 2024
1 parent e76df9a commit a032fa0
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion Scripts/Update-MongoDB.MongoDBAtlasCLI.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ $content = $website.Content
$links = $content | Select-String -Pattern 'https?://[^"]+' -AllMatches | % { $_.Matches } | % { $_.Value }
$msilinks = $links | Select-String -Pattern 'https?://[^\s]*\.msi' -AllMatches | ForEach-Object { $_.Matches } | ForEach-Object { $_.Value }

$PackageFilter = $PackageMapping[$wingetPackage]
$Packagelinks = $msilinks | Select-String -Pattern "https?://[^\s]*$PackageFilter[^\s]*\.msi" -AllMatches | ForEach-Object { $_.Matches } | ForEach-Object { $_.Value }| Where-Object { $_ -notmatch "$PackageFilter-isolated|$PackageFilter-readonly" }
# Extract versions from the links
$versions = $Packagelinks | ForEach-Object { $_ -match '(\d+\.\d+\.\d+(-rc\d*|-beta\d*)?)' | Out-Null; $matches[1] }
Expand Down

0 comments on commit a032fa0

Please sign in to comment.