forked from Kooboo/Kooboo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
generateZip.bat
62 lines (47 loc) · 1.86 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
60
61
62
@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%)
::sign kooboo
set signToolPath=%batPath%\tools\signtool
set certPath=%koobooPath%\bin\%buildType%\yardi.pfx
if exist "%certPath%" (
%signToolPath% sign /f %certPath% /p 1 %koobooPath%\bin\%buildType%\kooboo.exe
%signToolPath% timestamp /t http://timestamp.wosign.com/timestamp %koobooPath%\bin\%buildType%\kooboo.exe
)
::compress js and css in Admin folder
if exist "%fileCompressPath%" (
%fileCompressPath%\FileCompress.exe
)
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%
:: 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%