2019-12-02 16:52:36 -05:00
|
|
|
param (
|
|
|
|
[string]$PublishDir = $(throw "-PublishDir is required.")
|
|
|
|
)
|
|
|
|
|
2019-12-07 21:28:50 -05:00
|
|
|
md -Force ("{0}\Localization" -f $PublishDir)
|
2019-12-07 21:20:44 -05:00
|
|
|
|
2019-12-02 16:52:36 -05:00
|
|
|
$localizations = @("en-US", "ru-RU", "es-EC", "pt-BR", "de-DE")
|
|
|
|
foreach($localization in $localizations)
|
|
|
|
{
|
|
|
|
$url = "http://api.raidmax.org:5000/localization/{0}" -f $localization
|
|
|
|
$filePath = "{0}\Localization\IW4MAdmin.{1}.json" -f $PublishDir, $localization
|
|
|
|
$response = Invoke-WebRequest $url
|
|
|
|
Out-File -FilePath $filePath -InputObject $response.Content -Encoding utf8
|
2019-12-07 20:52:03 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
$versionInfo = (Get-Command ("{0}\IW4MAdmin.exe" -f $PublishDir)).FileVersionInfo
|
|
|
|
$json = @{
|
|
|
|
Major = $versionInfo.ProductMajorPart
|
|
|
|
Minor = $versionInfo.ProductMinorPart
|
|
|
|
Build = $versionInfo.ProductBuildPart
|
|
|
|
Revision = $versionInfo.ProductPrivatePart
|
|
|
|
}
|
2019-12-07 21:11:22 -05:00
|
|
|
$json | ConvertTo-Json > ("{0}\VersionInformation.json" -f $PublishDir)
|