Spaces:
Sleeping
Sleeping
Update autocommit.sh
Browse files- autocommit.sh +1 -5
autocommit.sh
CHANGED
|
@@ -31,12 +31,8 @@ rsync -av --delete --exclude='.git/' "$WORKSPACE/" ./
|
|
| 31 |
|
| 32 |
# 4. 检查、提交、推送
|
| 33 |
if [[ -n $(git status --porcelain) ]]; then
|
| 34 |
-
# 设置本次提交的作者信息(可自定义)
|
| 35 |
-
git config user.email "backup@system"
|
| 36 |
-
git config user.name "Backup Bot"
|
| 37 |
-
|
| 38 |
git add -A
|
| 39 |
-
git commit -m "
|
| 40 |
|
| 41 |
# 推送时将使用全局配置的凭证
|
| 42 |
if git push origin "$BRANCH_BACKUP"; then
|
|
|
|
| 31 |
|
| 32 |
# 4. 检查、提交、推送
|
| 33 |
if [[ -n $(git status --porcelain) ]]; then
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
git add -A
|
| 35 |
+
git commit -m "Auto-commit: $(date '+%Y-%m-%d %H:%M:%S')"
|
| 36 |
|
| 37 |
# 推送时将使用全局配置的凭证
|
| 38 |
if git push origin "$BRANCH_BACKUP"; then
|