-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathinstall-build.bat
More file actions
64 lines (27 loc) · 798 Bytes
/
Copy pathinstall-build.bat
File metadata and controls
64 lines (27 loc) · 798 Bytes
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
@echo off
setlocal
cd /d "%~dp0"
set "EXIT_CODE=0"
rem Sharp 需下载 @img/sharp-win32-x64 等大包,网络慢时可拉长超时(毫秒)
call npm config set fetch-timeout 600000 >nul 2>&1
echo [MKbot] 1/2 npm install ...
call npm install
if errorlevel 1 (
set "EXIT_CODE=1"
echo [MKbot] npm install failed, build skipped
echo [MKbot] 若卡在 sharp / @img/sharp-win32-x64,多为 registry 超时,可重试或设置镜像:
echo npm config set registry https://registry.npmmirror.com
goto end
)
echo [MKbot] 2/2 npm run build ...
call npm run build
if errorlevel 1 (
set "EXIT_CODE=1"
echo [MKbot] npm run build failed
goto end
)
echo [MKbot] build done -^> napcat-plugin-mkbot\
:end
echo.
pause
endlocal & exit /b %EXIT_CODE%