-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathbuild.bat
35 lines (28 loc) · 892 Bytes
/
build.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
30
31
32
33
34
35
rmdir /S /Q dist
del release.zip
mkdir dist
copy package.json dist
copy actions.yml dist
copy start.bat dist
copy LICENSE.txt dist
copy README.md dist
call tsc --build server/tsconfig.json
call tsc --build ui/tsconfig.json
cd dist
@echo off
setlocal enableextensions disabledelayedexpansion
set "search=file:hid-handler"
set "replace=file:../hid-handler"
set "textFile=package.json"
for /f "delims=" %%i in ('type "%textFile%" ^& break ^> "%textFile%" ') do (
set "line=%%i"
setlocal enabledelayedexpansion
>>"%textFile%" echo(!line:%search%=%replace%!
endlocal
)
call npm install --dev
call npm prune --production
del package.json
del package-lock.json
cd ..
powershell.exe -nologo -noprofile -command "& { Add-Type -A 'System.IO.Compression.FileSystem'; [IO.Compression.ZipFile]::CreateFromDirectory('dist', 'release.zip'); }"