forked from EQEmu/Server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deb-build.ps1
10 lines (9 loc) · 905 Bytes
/
deb-build.ps1
1
2
3
4
5
6
7
8
9
10
Set-PSDebug -Trace 1
docker build -t eqemu_debian . ; if (-not $?) { exit $LastExitCode }
docker rm build_result
docker run --workdir /source/ --name build_result eqemu_debian /bin/bash ./deb-build.sh ; if (-not $?) { exit $LastExitCode }
Start-Process powershell -Verb RunAs -Wait "cd $(Get-Location); docker cp build_result:/source/deb-build ./" ; if (-not $?) { exit $LastExitCode }
docker rm build_result ; if (-not $?) { exit $LastExitCode }
docker image prune -f ; if (-not $?) { exit $LastExitCode }
scp -r deb-build/bin/ [email protected]:/home/eqemu/server_build/temp ; if (-not $?) { exit $LastExitCode }
ssh [email protected] "chown -R eqemu:eqemu /home/eqemu/server_build/temp && chmod -R a+x /home/eqemu/server_build/temp/ && mv -f /home/eqemu/server_build/temp/bin/* /home/eqemu/server_build/bin/ && su eqemu -c 'cd /home/eqemu/server && ./stop.sh && ./start_with_login.sh'"