forked from spatialos/UnrealGDKTestGyms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
DeployGame.bat
29 lines (25 loc) · 900 Bytes
/
DeployGame.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
@echo off
setlocal ENABLEDELAYEDEXPANSION
:: Get the current date to name the assembly
call "%~dp0ProjectPaths.bat"
set datestr=%date%
set formatdate=%datestr:/=%
:: Remove spaces, and set to all lowercase
set gamename=%GAME_NAME: =%
for %%L IN (a b c d e f g h i j k l m n o p q r s t u v w x y z) DO SET gamename=!gamename:%%L=%%L!
set deploymentname=%gamename%%formatdate%
:: Upload the assembly, and launch the deployment
cd spatial/
spatial build build-config || goto :error
spatial cloud upload %deploymentname% --force || goto :error
spatial cloud launch %deploymentname% one_worker_test.json %deploymentname% --snapshot=snapshots/default.snapshot --cluster_region=eu --runtime_version=0.4.0 || goto :error
spatial project deployment tags add %deploymentname% dev_login || goto :error
echo Deployment succeeded.
cd ../
pause
exit /b 0
:error
echo Deployment failed.
cd ../
pause
exit /b 1