feat(premium): add summon squire spell to Spell.dbc
This commit is contained in:
@@ -10,3 +10,6 @@ AWS_USE_PATH_STYLE_ENDPOINT=
|
||||
PRODUCTION_REALMLIST=
|
||||
PTR_REALMLIST=
|
||||
LOCAL_REALMLIST=
|
||||
|
||||
SSH_USER=root
|
||||
SSH_HOST=strictlypragmatic.ru
|
||||
Binary file not shown.
@@ -0,0 +1,64 @@
|
||||
# Sync DBC files from src with files on a server
|
||||
|
||||
# Parse .env
|
||||
if (Test-Path ".env") {
|
||||
Get-Content ".env" | ForEach-Object {
|
||||
if ($_ -match '^[^#\s]+=.+') {
|
||||
$name, $value = $_ -split '=', 2
|
||||
$name = $name.Trim()
|
||||
$value = $value.Trim().Trim('"').Trim("'")
|
||||
[System.Environment]::SetEnvironmentVariable($name, $value)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Write-Error ".env not found!"
|
||||
exit 1
|
||||
}
|
||||
|
||||
$user = $env:SSH_USER
|
||||
$sshHost = $env:SSH_HOST
|
||||
$port = $env:SSH_PORT
|
||||
|
||||
if (-not $user -or -not $sshHost) {
|
||||
Write-Error "SSH_USER or SSH_HOST env variables are not defined"
|
||||
exit 1
|
||||
}
|
||||
|
||||
if (-not $port) {
|
||||
$port = "22"
|
||||
}
|
||||
|
||||
$input = @(
|
||||
".\src\Data\ruRU\patch-ruRU-5\DBFilesClient\Achievement.dbc",
|
||||
".\src\Data\ruRU\patch-ruRU-Z\DBFilesClient\Spell.dbc",
|
||||
".\src\Data\ruRU\patch-ruRU-Z\DBFilesClient\BarberShopStyle.dbc",
|
||||
".\src\Data\ruRU\patch-ruRU-Z\DBFilesClient\CreatureDisplayInfoExtra.dbc",
|
||||
".\src\Data\ruRU\patch-ruRU-Z\DBFilesClient\SpellVisualKitModelAttach.dbc"
|
||||
)
|
||||
|
||||
$output = "/home/mangos/moonwell-server/env/dist/data/dbc"
|
||||
|
||||
foreach ($file in $input) {
|
||||
if (Test-Path $file) {
|
||||
$fileName = Split-Path $file -Leaf
|
||||
$outputPath = "$output/$fileName"
|
||||
|
||||
Write-Host "Copying $fileName to $output..."
|
||||
|
||||
scp -P $port $file "${user}@${sshHost}:${output}"
|
||||
|
||||
if ($LASTEXITCODE -eq 0) {
|
||||
Write-Host "Running chmod..."
|
||||
|
||||
ssh -p $port "${user}@${sshHost}" "chown mangos:mangos '$outputPath' && chmod 775 '$outputPath'"
|
||||
}
|
||||
|
||||
} else {
|
||||
Write-Warning "Input file not found: $file"
|
||||
}
|
||||
}
|
||||
|
||||
Write-Host "Restarting server..."
|
||||
ssh -p $port "${user}@${sshHost}" "cd /home/mangos/moonwell-server && docker compose restart ac-worldserver"
|
||||
|
||||
Write-Host "Done."
|
||||
Reference in New Issue
Block a user