fix: only push on changed
All checks were successful
push / build (push) Successful in 4m5s

This commit is contained in:
张泊明518370910136 2025-06-03 22:10:29 -04:00
parent 2188fadd9d
commit d9b337f8f6
GPG Key ID: CA088E6D9284F870

View File

@ -5,12 +5,14 @@ REPO_PATH=/home/tt/.cache/$COURSE-config
GIT_USER=$(whoami) GIT_USER=$(whoami)
GIT_HOSTNAME=$(hostname -s) GIT_HOSTNAME=$(hostname -s)
GIT_EMAIL="${GIT_USER}@${GIT_HOSTNAME}" GIT_EMAIL="${GIT_USER}@${GIT_HOSTNAME}"
git -C $REPO_PATH pull git -C $REPO_PATH pull --rebase
rsync -r --delete $REPO_PATH/home/tt/.config/ /home/tt/.config rsync -r --delete $REPO_PATH/home/tt/.config/ /home/tt/.config
joj3-forge convert /home/tt/.config/joj joj3-forge convert /home/tt/.config/joj
rsync -r --delete /home/tt/.config/joj/ $REPO_PATH/home/tt/.config/joj rsync -r --delete /home/tt/.config/joj/ $REPO_PATH/home/tt/.config/joj
git -C $REPO_PATH config user.name $GIT_USER git -C $REPO_PATH config user.name $GIT_USER
git -C $REPO_PATH config user.email $GIT_EMAIL git -C $REPO_PATH config user.email $GIT_EMAIL
git -C $REPO_PATH add home/tt/.config/joj git -C $REPO_PATH add home/tt/.config/joj
git -C $REPO_PATH commit -m "chore: joj3-forge convert" if ! git -C "$REPO_PATH" diff --staged --quiet; then
git -C $REPO_PATH push git -C $REPO_PATH commit -m "chore: joj3-forge convert"
git -C $REPO_PATH push
fi