-
Notifications
You must be signed in to change notification settings - Fork 95
/
generateLinuxZip.bat
50 lines (38 loc) · 1.5 KB
/
generateLinuxZip.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
@ECHO off
::%1--->build type:release,server
::set buildType=%1
set batPath=%~dp0
set basePath=%batPath%
set adminPath=%basePath%Kooboo.Web\_Admin
set langPath=%basePath%Kooboo.Web\Lang
set koobooPath=%basePath%Kooboo.App.Standard\bin\release
::dotnet core file
::kooboo publish path
set dllPath=%koobooPath%\PublishOutput
set zipFile=%koobooPath%\KoobooLinux.zip
::delete existed zipFile
if exist "%zipFile%" (del %zipFile%)
set copyBasePath=%koobooPath%\Kooboo
set copyFolder=%copyBasePath%\Kooboo
set copyAdminPath=%copyFolder%\_Admin
set copyDllPath=%copyFolder%
set copyLangPath=%copyFolder%\Lang
set copyRuntimesPath=%copyFolder%\runtimes
::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
::copy dll,exe,config
C:\Windows\System32\robocopy %dllPath% %copyDllPath% *.dll *.exe *.config *.json
::copy language
C:\Windows\System32\robocopy %langPath% %copyLangPath%
::copy modules
C:\Windows\System32\robocopy %basePath%Kooboo.Web\modules %copyFolder%\modules
::copy runtimes
C:\Windows\System32\robocopy %dllPath%\runtimes %copyRuntimesPath% /e
::copy Kooboo.ServerUpgrade.runtimeconfig.json
Copy %copyDllPath%\Kooboo.App.runtimeconfig.json %copyDllPath%\Kooboo.App.Upgrade.runtimeconfig.json
set zipExePath=%batPath%\tools\7z\
::zip folder
%zipExePath%\7z.exe a -tzip %zipFile% %copyBasePath%\* -r
rd /s /q %copyBasePath%