forked from liuw1535/antigravity2api-nodejs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdate.sh
More file actions
37 lines (32 loc) · 717 Bytes
/
update.sh
File metadata and controls
37 lines (32 loc) · 717 Bytes
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
#!/bin/bash
echo "========================================"
echo "Antigravity2API 更新脚本"
echo "========================================"
echo
echo "[1/3] 保存本地修改..."
git stash push -m "Auto stash before update"
if [ $? -ne 0 ]; then
echo "保存修改失败"
exit 1
fi
echo
echo "[2/3] 拉取最新代码..."
git pull origin main
if [ $? -ne 0 ]; then
echo "拉取更新失败"
exit 1
fi
echo
echo "[3/3] 安装依赖..."
npm install
echo
echo "========================================"
echo "更新完成!"
echo "========================================"
echo
echo "恢复本地修改:"
echo " git stash pop"
echo
echo "删除本地修改:"
echo " git stash drop"
echo