forked from Kooboo/Kooboo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgenerateZip.bat
59 lines (46 loc) · 1.81 KB
/
generateZip.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
@ECHO off
::%1--->build type:release,server
set buildType=Release
set batPath=%1
set adminPath=%batPath%Kooboo.Web\_Admin
set koobooPath=%batPath%Kooboo.App
set dllPath=%koobooPath%\bin\%buildType%
set langPath=%batPath%Kooboo.Web\Lang
set zipFile=%dllPath%\Kooboo.zip
set fileCompressPath=%batPath%\published\
::delete existed zipFile
if exist "%zipFile%" (del %zipFile%)
set copyBasePath=%koobooPath%\bin\%buildType%\Kooboo
set copyFolder=%copyBasePath%\Kooboo
set copyAdminPath=%copyFolder%\_Admin
set copyDllPath=%copyFolder%
set copyLangPath=%copyFolder%\Lang
::reset _admin fold if minifierAmdinPath exists
set minifierAmdinPath=%batPath%Kooboo.Web\Minifier\_Admin
if exist "%minifierAmdinPath%" ( set adminPath=%minifierAmdinPath%)
::copy _admin exclude kbtest .vscode mobileEditor
C:\Windows\System32\robocopy %adminPath% %copyAdminPath% /e /xd kbtest .vscode mobileEditor Market
::copy kbtest
C:\Windows\System32\robocopy %adminPath%\kbtest %copyAdminPath%\kbtest /e
::Kooboo.exe
C:\Windows\System32\robocopy %dllPath% %copyDllPath% Kooboo.exe
::Kooboo.Upgrade.exe
C:\Windows\System32\robocopy %dllPath% %copyDllPath%\Upgrade Kooboo.Upgrade.exe
::copy language
C:\Windows\System32\robocopy %langPath% %copyLangPath%
::copy modules
C:\Windows\System32\robocopy %batPath%Kooboo.Web\modules %copyFolder%\modules
::copy sqlite
C:\Windows\System32\robocopy %koobooPath%\bin\%buildType%\x64 %copyDllPath%\x64
for %%i in (%copyFolder%\modules\*.zip) do (
for /f %%b in (%koobooPath%\ignoremodules.txt) do (
if %%~nxb == %%~nxi (del %%i)
)
)
rd /s /q %copyAdminPath%\Scripts\lib\vs
:: delete minifier admin
if exist "%minifierAmdinPath%" ( rd /s /q %batPath%Kooboo.Web\Minifier)
set zipExePath=%batPath%\tools\7z\
::zip folder
%zipExePath%\7z.exe a -tzip %zipFile% %copyBasePath%\* -r
::rd /s /q %copyBasePath%