nope/07-WAMO-Update.bat
2021-04-23 18:28:39 +02:00

44 lines
827 B
Batchfile

set DIR=%~dp0
cd "%DIR%"
@echo off
git pull
%@Try%
@REM Uninstall IO-Server
node .\dist\lib\cli\ioServerService.js -m uninstall
%@EndTry%
:@Catch
echo uninstall IO-Server
:@EndCatch
@REM Uninstall all Services
for /f "delims=" %%a in ('dir /s /o /b *03-uninstall.bat') do (
echo %%a
call %%a
)
@REM Delete old Files.
rmdir dist /s /q
rmdir services /s /q
@REM compile
%@Try%
echo Recompiling
call npx tsc -p ./tsconfigBackend.json --pretty
%@EndTry%
:@Catch
echo Expected some errors
:@EndCatch
@REM update the Configuration:
node .\dist\modules\wamo\cli\generateConfig.js
node .\dist\lib\cli\createService.js
node .\dist\lib\cli\ioServerService.js -m install
@REM now reinstall the services
@REM Uninstall all Services
for /f "delims=" %%a in ('dir /s /o /b *01-install.bat') do (
echo %%a
call %%a
)