-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.sh
More file actions
executable file
·40 lines (33 loc) · 1.14 KB
/
Copy pathpackage.sh
File metadata and controls
executable file
·40 lines (33 loc) · 1.14 KB
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
#!/bin/bash
echo "创建临时目录…"
rm -rf dist
mkdir dist
mkdir -p dist/src/extension
echo "更新版本号…"
node update_version.js
echo "生成 PNG 图标…"
npm run build:icons
echo "复制文件…"
cp manifest.json dist/
cp src/extension/popup.html dist/src/extension/
cp src/extension/fullpage.html dist/src/extension/
cp src/extension/popup.js dist/src/extension/
cp src/extension/fullpage.js dist/src/extension/
cp src/extension/state.js dist/src/extension/
cp src/extension/cloudClient.js dist/src/extension/
cp src/extension/storageAdapter.js dist/src/extension/
cp src/extension/authClient.js dist/src/extension/
cp src/extension/syncService.js dist/src/extension/
cp src/extension/styles.css dist/src/extension/
cp src/extension/background.js dist/src/extension/
cp -r icons dist/
cp src/extension/default-favicon.png dist/src/extension/ 2>/dev/null || cp src/extension/default-favicon.svg dist/src/extension/default-favicon.png 2>/dev/null || true
echo "创建 zip 文件…"
rm -f tabay.zip
cd dist
zip -r ../tabay.zip *
cd ..
echo "清理临时文件…"
rm -rf dist
echo "打包完成!"
echo "插件文件已保存为:tabay.zip"