This repository has been archived by the owner on Dec 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 48
/
Copy pathbeta.cmd
74 lines (59 loc) · 2.62 KB
/
beta.cmd
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
64
65
66
67
68
69
70
71
72
73
74
@echo off
title Pushing...
mkdir build
mkdir dist
echo Trace Folder
set DirArray[0]=TraceBeta
set ManifestArray[0]=chrome
set "x=0"
set "y=0"
:CreateDirLoop
if defined DirArray[%x%] (
call echo "Building for %%DirArray[%x]%%"
call mkdir build\%%DirArray[%x%]%%
call mkdir build\%%DirArray[%x%]%%\_locales
call mkdir build\%%DirArray[%x%]%%\_locales\en
call mkdir build\%%DirArray[%x%]%%\css
call mkdir build\%%DirArray[%x%]%%\html
call mkdir build\%%DirArray[%x%]%%\data
call mkdir build\%%DirArray[%x%]%%\icons
call mkdir build\%%DirArray[%x%]%%\js
call mkdir build\%%DirArray[%x%]%%\js\background
call mkdir build\%%DirArray[%x%]%%\js\common
call mkdir build\%%DirArray[%x%]%%\js\contentscript
call mkdir build\%%DirArray[%x%]%%\js\pages
call mkdir build\%%DirArray[%x%]%%\js\pages\options
call mkdir build\%%DirArray[%x%]%%\js\libraries
set /a "x+=1"
GOTO :CreateDirLoop
)
echo.
echo Copying Trace files...
:CopyTraceFiles
if defined ManifestArray[%y%] (
call echo "Copying data for %%ManifestArray[%y]%%"
call copy %CD%\MyTrace\_locales\en\*.json %CD%\build\%%DirArray[%y%]%%\_locales\en /y
call copy %CD%\MyTrace\css\*.css %CD%\build\%%DirArray[%y%]%%\css /y
call copy %CD%\MyTrace\html\*.html %CD%\build\%%DirArray[%y%]%%\html /y
call copy %CD%\MyTrace\data\*.json %CD%\build\%%DirArray[%y%]%%\data /y
call copy %CD%\MyTrace\icons\*.png %CD%\build\%%DirArray[%y%]%%\icons /y
call copy %CD%\MyTrace\icons\*.gif %CD%\build\%%DirArray[%y%]%%\icons /y
call copy %CD%\MyTrace\js\background\*.js %CD%\build\%%DirArray[%y%]%%\js\background /y
call copy %CD%\MyTrace\js\common\*.js %CD%\build\%%DirArray[%y%]%%\js\common /y
call copy %CD%\MyTrace\js\contentscript\*.js %CD%\build\%%DirArray[%y%]%%\js\contentscript /y
call copy %CD%\MyTrace\js\pages\*.js %CD%\build\%%DirArray[%y%]%%\js\pages /y
call copy %CD%\MyTrace\js\pages\options\*.js %CD%\build\%%DirArray[%y%]%%\js\pages\options /y
call copy %CD%\MyTrace\js\libraries\*.js %CD%\build\%%DirArray[%y%]%%\js\libraries /y
call copy %CD%\MyTrace\js\libraries\jquery-3.4.1.js %CD%\build\%%DirArray[%y%]%%\js\libraries\jquery.js /y
call copy %CD%\MyTrace\manifest.%%ManifestArray[%y%]%%.json %CD%\build\%%DirArray[%y%]%%\manifest.json /y
call echo Compressing...
call %php% min.php
call del %CD%\build\%%DirArray[%y%]%%\js\libraries\jquery-3.4.1.js
call del %CD%\build\%%DirArray[%y%]%%\js\libraries\jquery-3.4.1.min.js
call echo Creating package for %%ManifestArray[%y%]%% webstore
call "C:\Program Files\7-Zip\7z.exe" a dist\Trace-%%ManifestArray[%y%]%%-UpdateID%random%%random%.zip %CD%\build\%%DirArray[%y%]%%\*
set /a "y+=1"
GOTO :CopyTraceFiles
)
echo.
pause