-
Notifications
You must be signed in to change notification settings - Fork 535
/
Copy pathrelease-archive.sh
57 lines (46 loc) · 1.38 KB
/
release-archive.sh
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
#!/bin/bash
set -exu
__DIR__=$(
cd "$(dirname "$0")"
pwd
)
cd ${__DIR__}
test -d dist && rm -rf dist
mkdir -p dist/
cd ${__DIR__}/dist
test -f ReplaceGoogleCDN-v2.zip && rm -f ReplaceGoogleCDN-v2.zip
test -f ReplaceGoogleCDN-v3.zip && rm -f ReplaceGoogleCDN-v3.zip
cd ${__DIR__}/extension
# 打包 manifest v3 支持chromium 内核系列
zip -r ../dist/ReplaceGoogleCDN-v3.zip . \
-x "tools/*" \
-x "_metadata/*" \
-x "rules/advance-no-use/*" \
-x "rules/example-no-use/*" \
-x "rules/README.md" \
-x "screenshot/*" \
-x "test/*" \
-x "web/*" \
-x "web-backup/*" \
-x "manifest-backup.json" \
-x "third_party/highlightjs/*" \
-x "third_party/josdejong/*" \
-x "third_party/webrtc/*"
cd ${__DIR__}
zip -u dist/ReplaceGoogleCDN-v3.zip ./README.md
zip -u dist/ReplaceGoogleCDN-v3.zip ./Privacy.md
zip -u dist/ReplaceGoogleCDN-v3.zip ./LICENSE
zip -u dist/ReplaceGoogleCDN-v3.zip ./CHANGELOG-0.10.x.md
# 打包 manifest v2 支持chromium 内核系列 和 firefox
cd ${__DIR__}/extension-v2/
zip -r ../dist/ReplaceGoogleCDN-v2.zip . \
-x "./README.md"
cd ${__DIR__}
zip -u dist/ReplaceGoogleCDN-v2.zip ./README.md
zip -u dist/ReplaceGoogleCDN-v2.zip ./Privacy.md
zip -u dist/ReplaceGoogleCDN-v2.zip ./LICENSE
cd ${__DIR__}/dist
# 查看打包结果
unzip ReplaceGoogleCDN-v2.zip -d ReplaceGoogleCDN-v2
unzip ReplaceGoogleCDN-v3.zip -d ReplaceGoogleCDN-v3
cd ${__DIR__}