Switch GeoIP database from MaxMind to IP2Location.
The IP2Location data is licensed under CC BY-SA, which allows us to distribute the database with releases.
This commit is contained in:
7
make.ps1
7
make.ps1
@@ -21,6 +21,13 @@ function All-Command
|
||||
{
|
||||
Write-Host "Build succeeded." -ForegroundColor Green
|
||||
}
|
||||
|
||||
if (!(Test-Path "IP2LOCATION-LITE-DB1.IPV6.BIN.ZIP") -Or (((get-date) - (get-item "IP2LOCATION-LITE-DB1.IPV6.BIN.ZIP").LastWriteTime) -gt (new-timespan -days 30)))
|
||||
{
|
||||
echo "Downloading IP2Location GeoIP database."
|
||||
$target = Join-Path $pwd.ToString() "IP2LOCATION-LITE-DB1.IPV6.BIN.ZIP"
|
||||
(New-Object System.Net.WebClient).DownloadFile("https://download.ip2location.com/lite/IP2LOCATION-LITE-DB1.IPV6.BIN.ZIP", $target)
|
||||
}
|
||||
}
|
||||
|
||||
function Clean-Command
|
||||
|
||||
Reference in New Issue
Block a user