feat: always commit changes
All checks were successful
push / build (push) Successful in 2m17s

This commit is contained in:
张泊明518370910136 2025-11-27 21:24:16 -08:00
parent 8dd6277837
commit 70bad992dd
GPG Key ID: CA088E6D9284F870

View File

@ -27,6 +27,7 @@ main() {
local git_user="bot-$course" local git_user="bot-$course"
local git_email="bot-$course@focs.ji.sjtu.edu.cn" local git_email="bot-$course@focs.ji.sjtu.edu.cn"
local git_server="ssh://git@focs.ji.sjtu.edu.cn:2222" local git_server="ssh://git@focs.ji.sjtu.edu.cn:2222"
local joj3_forge_exit_code=0
# init repos if not exist # init repos if not exist
if ! [ -d "$config_repo_path" ]; then if ! [ -d "$config_repo_path" ]; then
@ -77,7 +78,7 @@ EOF
exit 1 exit 1
fi fi
joj3-forge convert "/home/tt/.config/joj" joj3-forge convert "/home/tt/.config/joj" || joj3_forge_exit_code=$?
rsync -a --delete "/home/tt/.config/joj/" "$config_repo_path/home/tt/.config/joj" rsync -a --delete "/home/tt/.config/joj/" "$config_repo_path/home/tt/.config/joj"
# enforce correct permissions # enforce correct permissions
@ -94,6 +95,8 @@ EOF
git -C "$config_repo_path" commit -m "chore: $commit_hash trigger joj3-forge convert [skip ci]" git -C "$config_repo_path" commit -m "chore: $commit_hash trigger joj3-forge convert [skip ci]"
git -C "$config_repo_path" push git -C "$config_repo_path" push
fi fi
exit "$joj3_forge_exit_code"
} }
main "$@" main "$@"